Commit Graph

137321 Commits

Author SHA1 Message Date
Richard Smith 2603b096df PR9903: Recover from a member functon declared with the 'typedef' specifier by
dropping the specifier, just like we do for non-member functions and function
templates declared 'typedef'. Patch by Brian Brooks!

llvm-svn: 168108
2012-11-15 22:54:20 +00:00
Eli Friedman e6385e61b5 Mark FP_ROUND for converting NEON v2f64 to v2f32 as expand. Add a missing
case to vector legalization so this actually works.

Patch by Pete Couperus.  Fixes PR12540.

llvm-svn: 168107
2012-11-15 22:44:27 +00:00
Jim Ingham b42f3af336 Don't lock the thread list during ThreadList::ShouldStop. That does too
much work for this to make sense.  Just copy the current thread list and
operate on that.  Prevents some deadlocks.

llvm-svn: 168106
2012-11-15 22:44:04 +00:00
Anna Zaks fab9bb6890 [analyzer] CmpRuns: move the clang_version info into the run (out of
report)

llvm-svn: 168105
2012-11-15 22:42:44 +00:00
Eric Christopher 4bb9c6c3b1 More ownership, no one likes these things anyways.
llvm-svn: 168104
2012-11-15 22:41:56 +00:00
Michael Ilseman 26ee2b8477 Remove trailing whitespace
llvm-svn: 168103
2012-11-15 22:34:00 +00:00
Nadav Rotem 7a697bc8dc Update the code ownership.
llvm-svn: 168102
2012-11-15 22:26:51 +00:00
Dmitri Gribenko abbb210b6b Comment to XML conversion test: correct filename.
llvm-svn: 168101
2012-11-15 22:21:42 +00:00
Jordan Rose f477505d03 [analyzer] SATestBuild.py: correctly add -j option for projects using make.
llvm-svn: 168099
2012-11-15 22:03:53 +00:00
Dmitri Gribenko d947a66c13 Split annotate-comments.cpp into a fragile (that uses hardcoded line numbers)
and a non-fragile (that uses [[@LINE]]) parts.

llvm-svn: 168098
2012-11-15 22:03:13 +00:00
Daniel Dunbar c61fae4205 tests: Mark the /dev/fd test as requiring Darwin until I can test on other OSes.
llvm-svn: 168095
2012-11-15 21:31:13 +00:00
Jyotsna Verma 095d4fe02b Fix typo.
llvm-svn: 168091
2012-11-15 21:21:01 +00:00
Sebastian Pop 654b7754bc autoconf: isl depends on gmp include files
When libgmp header files are not installed in the default /usr/include location,
configure used to fail to find the gmp headers when testing for isl/ast.h.  This
patch adds the gmp include path to the compiler flags before testing for ISL.

llvm-svn: 168090
2012-11-15 21:20:22 +00:00
Akira Hatanaka 3bc1beb696 [mips] Add predicate HasFPIdx for floating-point indexed load instruction
support and use it in place of HasMips32r2Or64.

llvm-svn: 168089
2012-11-15 21:17:13 +00:00
Joel Jones 8fe56e00ed Add description of how to build docs
llvm-svn: 168088
2012-11-15 21:15:08 +00:00
Argyrios Kyrtzidis ec1594a7b5 [utils/ClangDataFormat.py] For invalid source locations just return
"<invalid loc>" for summary.

llvm-svn: 168087
2012-11-15 20:59:00 +00:00
Adhemerval Zanella bdface5699 PowerPC: Lowering floor intrinsic for Altivec
This patch lowers the llvm.floor, llvm.ceil, llvm.trunc, and
llvm.nearbyint to Altivec instruction when using 4 single-precision
float vectors.

llvm-svn: 168086
2012-11-15 20:56:03 +00:00
Daniel Dunbar d9cb0ba660 tests: Check that we can output to /dev/fd filesystem.
- An LLVM unique_file() bug could cause us to infinite loop on the later test
   case.

llvm-svn: 168082
2012-11-15 20:24:58 +00:00
Daniel Dunbar 61d59f2959 PathV2: Fix a possible infinite loop.
- The code could infinite loop trying to create unique files, if the directory
   containing the unique file exists, but open() calls on non-existent files in
   the path return ENOENT. This is true on the /dev/fd filesystem, for example.

 - Will add a clang side test case for this.

llvm-svn: 168081
2012-11-15 20:24:52 +00:00
Jordan Rose 19bc88c3d4 [analyzer] Fix a use-after-free introduced in r168019.
In code like this:

void foo() {
     bar();
     baz();
}

...the location for the call to 'bar()' was being used as a backup location
for the call to 'baz()'. This is fine unless the call to 'bar()' is deemed
uninteresting and that part of the path deleted.

(This looks like a logic error as well, but in practice the only way 'baz()'
could have an invalid location is if the entire body of 'foo()' is
synthesized, meaning the call to 'bar()' will be using the location of the
call to 'foo()' anyway. Nevertheless, the new version better matches the
intent of the code.)

Found by Matt Beaumont-Gay using ASan. Thanks, Matt!

llvm-svn: 168080
2012-11-15 20:10:05 +00:00
Daniel Dunbar 523855929b tests: Add a test for reading from named pipes.
- Realized I could use the /dev/fd filesystem to make a simple portable test.

llvm-svn: 168079
2012-11-15 20:06:10 +00:00
Akira Hatanaka 5fdeac3268 Add assertions in MipsLongBranch which check the size of basic blocks.
llvm-svn: 168078
2012-11-15 20:05:11 +00:00
Douglas Gregor 4b27a64b92 If an excluded header does not exist, just ignore it
llvm-svn: 168077
2012-11-15 19:47:16 +00:00
Jakub Staszak f34e4fa7a6 Return 0 instead of false.
llvm-svn: 168076
2012-11-15 19:40:29 +00:00
Greg Clayton 824e7c0dfb <rdar://problem/12125010>
Handle universal BSD archives correctly when parsing DWARF in .o files with debug map.

llvm-svn: 168075
2012-11-15 19:37:18 +00:00
Ulrich Weigand dcee8ce8ed Use std::stable_sort instead of std::sort when sorting stack slots
to guarantee deterministic code generation.

llvm-svn: 168074
2012-11-15 19:33:30 +00:00
Evan Cheng 4921017afd Clarify my code ownership
llvm-svn: 168073
2012-11-15 19:31:48 +00:00
Sergei Larin 973a44bf7d Add myself as owner of VLIW Instruction Scheduling and Packetization.
llvm-svn: 168072
2012-11-15 19:24:19 +00:00
Jim Ingham ef404fc9c6 Explain how to use "expr -u" as the lldb equivalent of "set unwind-on-signal 0; print".
llvm-svn: 168071
2012-11-15 19:13:33 +00:00
Jordan Rose e37ab50a6e [analyzer] Report leaks at the closing brace of a function body.
This fixes a few cases where we'd emit path notes like this:

  +---+
 1|   v
  p = malloc(len);
  ^   |2
  +---+

In general this should make path notes more consistent and more correct,
especially in cases where the leak happens on the false branch of an if
that jumps directly to the end of the function. There are a couple places
where the leak is reported farther away from the cause; these are usually
cases where there are several levels of nested braces before the end of
the function. This still matches our current behavior for when there /is/
a statement after all the braces, though.

llvm-svn: 168070
2012-11-15 19:11:43 +00:00
Jordan Rose b9263cf112 [analyzer] StreamChecker: Remove now-unnecessary check::EndPath callback.
Also, don't bother to stop tracking symbols in the return value, either.
They are now properly considered live during checkDeadSymbols.

llvm-svn: 168069
2012-11-15 19:11:38 +00:00
Jordan Rose 7489ba5e0c [analyzer] MacOSKeychainAPIChecker: Remove now-unnecessary check::EndPath.
Also, don't bother to stop tracking symbols in the return value, either.
They are now properly considered live during checkDeadSymbols.

llvm-svn: 168068
2012-11-15 19:11:35 +00:00
Jordan Rose f1f2614017 [analyzer] MallocChecker: Remove now-unnecessary check::EndPath callback.
Also, don't bother to stop tracking symbols in the return value, either.
They are now properly considered live during checkDeadSymbols.

llvm-svn: 168067
2012-11-15 19:11:33 +00:00
Jordan Rose b5b0fc196e [analyzer] Mark symbol values as dead in the environment.
This allows us to properly remove dead bindings at the end of the top-level
stack frame, using the ReturnStmt, if there is one, to keep the return value
live. This in turn removes the need for a check::EndPath callback in leak
checkers.

This does cause some changes in the path notes for leak checkers. Previously,
a leak would be reported at the location of the closing brace in a function.
Now, it gets reported at the last statement. This matches the way leaks are
currently reported for inlined functions, but is less than ideal for both.

llvm-svn: 168066
2012-11-15 19:11:27 +00:00
Anton Korobeynikov 38990beed8 Add ARM EABI to my list of responsibilities.
Update the email address (old works too, but less reliable) while there

llvm-svn: 168065
2012-11-15 19:10:23 +00:00
Jakub Staszak 11d1aee6a2 Simplify code.
llvm-svn: 168064
2012-11-15 19:05:23 +00:00
Fariborz Jahanian 0e3043b2ed block extended signatur option. Change previous option
to a cc1 -fencode-extended-block-signature and pass it
to cc1 and recognize this option to produce extended block
type signature. // rdar://12109031 

llvm-svn: 168063
2012-11-15 19:02:45 +00:00
Argyrios Kyrtzidis 5259524b2f [modules] Use a memory buffer directly as input for the module includes,
instead of messing with virtual files.

llvm-svn: 168062
2012-11-15 18:57:27 +00:00
Argyrios Kyrtzidis 2ec2936778 [modules] Setup the import location of a module file and use it
as the include location of the main file of an imported module.

llvm-svn: 168061
2012-11-15 18:57:22 +00:00
Dmitry Vyukov 933c9889aa tsan: remove unused parameter
llvm-svn: 168060
2012-11-15 18:49:08 +00:00
Dmitry Vyukov f34db58c20 tsan: switch to 4 shadow cells by default (since that's what we use everywhere now)
llvm-svn: 168059
2012-11-15 18:44:22 +00:00
Andrew Trick 7656f6dbf7 misspell
llvm-svn: 168058
2012-11-15 18:40:31 +00:00
Andrew Trick 90f5029118 whitespace
llvm-svn: 168057
2012-11-15 18:40:29 +00:00
Dmitri Gribenko 60d4b99693 Comment to XML conversion: convert some tests to use the new [[@LINE]]
FileCheck feature.  This will hopefully make tests less fragile.

llvm-svn: 168056
2012-11-15 18:37:27 +00:00
Dmitri Gribenko 707cb04a9f Remove unused diagnostics from TableGen files.
llvm-svn: 168055
2012-11-15 18:32:56 +00:00
Chad Rosier 2463f67c49 [reg scavenger] Fix the isUsed/isAliasUsed functions so as to not report a false
positive.

In this particular case, R6 was being spilled by the register scavenger when it
was in fact dead.  The isUsed function reported R6 as used because the R6_R7
alias was reserved (due to the fact that we've reserved R7 as the FP).  The
solution is to only check if the original register (i.e., R6) isReserved and
not the aliases.  The aliases are only checked to make sure they're available.

The test case is derived from one of the nightly tester benchmarks and is rather
intractable and difficult to reproduce, so I haven't included it.
rdar://12592448

llvm-svn: 168054
2012-11-15 18:13:20 +00:00
Greg Clayton fbea0f64e2 <rdar://problem/11782181>
Fixed an issue where lldb was setting breakpoints on too many methods when a partial function name with namespaces or class qualifiers was used. For example setting a breakpoint of "Foo::dealloc" was accidentally settings breakpoints on all objective C functions whose selector was "dealloc"...

llvm-svn: 168053
2012-11-15 18:05:43 +00:00
Howard Hinnant 7166bff4ff Remove aborts under __dynamic_cast which were under _LIBCXX_DYNAMIC_FALLBACK. Change all type_info comparisons to use an inlined is_equal helper. However no change in functionality for this latter change at this time. This is just to encapsulate the comparison and make it a little easier to switch back and forth for testing/debugging.
llvm-svn: 168052
2012-11-15 18:00:42 +00:00
Sergei Larin e822148c80 Fix indeterminism in MI scheduler DAG construction.
Similarly to several recent fixes throughout the code replace std::map use with the MapVector.
Add find() method to the MapVector.

llvm-svn: 168051
2012-11-15 17:45:50 +00:00
Dmitry Vyukov 262465c126 tsan: eevn better handling of signals
add interceptor for poll()
in addition process signals in every atomic op
in addition process signals in blocking libc functions

llvm-svn: 168050
2012-11-15 17:40:49 +00:00