Commit Graph

121917 Commits

Author SHA1 Message Date
Jim Grosbach ffc02c5ffc ARM on darwin, v6 implies the presence of VFP for the assembler.
rdar://10838899

llvm-svn: 150222
2012-02-10 02:21:49 +00:00
Eli Friedman edb6f5dca1 Make sure we convert struct layout pragmas to attributes for class templates the same way we do for non-template classes. <rdar://problem/10791194>.
llvm-svn: 150221
2012-02-10 02:02:21 +00:00
Jakob Stoklund Olesen 9ef50bd66c Constrain the regmask search space for local live ranges.
When checking a local live range for interference, restrict the binary
search to the single block.

llvm-svn: 150220
2012-02-10 01:31:31 +00:00
Jakob Stoklund Olesen 25c4195ecc Cache basic block boundaries for faster RegMaskSlots access.
Provide API to get a list of register mask slots and bits in a basic
block.

llvm-svn: 150219
2012-02-10 01:26:29 +00:00
Jakob Stoklund Olesen aa06de2447 Optimize LiveIntervals::intervalIsInOneMBB().
No looping and binary searches necessary.

Return a pointer to the containing block instead of just a bool.

llvm-svn: 150218
2012-02-10 01:23:55 +00:00
Sean Callanan 933693b621 Fixed a bunch of ownership problems with the expression
parser.  Specifically:

- ClangUserExpression now keeps weak pointers to the
  structures it needs and then locks them when needed.
  This ensures that they continue to be valid without
  leaking memory if the ClangUserExpression is long
  lived.

- ClangExpressionDeclMap, instead of keeping a pointer
  to an ExecutionContext, now contains an
  ExecutionContext.  This prevents bugs if the pointer
  or its contents somehow become stale.  It also no
  longer requires that ExecutionContexts be passed
  into any function except its initialization function,
  since it can count on the ExecutionContext still
  being around.

There's a lot of room for improvement (specifically,
ClangExpressionDeclMap should also use weak pointers
insetad of shared pointers) but this is an important
first step that codifies assumptions that already
existed in the code.

llvm-svn: 150217
2012-02-10 01:22:05 +00:00
Anna Zaks e963fd51a8 [analyzer] MallocChecker: add a list of false positives based on running
the checker over postgres and sqlite.

llvm-svn: 150216
2012-02-10 01:11:03 +00:00
Anna Zaks 3188686c55 [analyzer] MallocChecker Cleanup - harden against crashes, fix an error
(use of return instead of continue), wording.

llvm-svn: 150215
2012-02-10 01:11:00 +00:00
Benjamin Kramer baa41d4175 Cache iterators. Some of these are expensive to create.
llvm-svn: 150214
2012-02-10 00:28:31 +00:00
Enrico Granata 55031d28ba fixing a macro name mismatch that was making our test case succeed for the wrong reason; plus a minor code change to the CPP side of the test which eases debugging efforts
llvm-svn: 150213
2012-02-10 00:10:27 +00:00
Fariborz Jahanian 591b7de030 objc translator: mode modern abi stuff.
llvm-svn: 150212
2012-02-10 00:04:22 +00:00
Sean Callanan 4d04c6ad07 Caching the DIE for the DeclContext as reported
by GetClangDeclContextContainingDIE, for better
debuggability.

llvm-svn: 150211
2012-02-09 22:54:11 +00:00
Bill Wendling e22bef7ff2 Remove evil const_cast that's not needed anymore.
llvm-svn: 150210
2012-02-09 22:45:21 +00:00
Aaron Ballman 6d1bebbad9 Switching to using dyn_cast_or_null, and fixing line endings in the test case.
llvm-svn: 150209
2012-02-09 22:16:56 +00:00
Bill Wendling a515b58460 Use SmallVector when we can instead of std::vector.
This looks like it had a small, but measurable performance improvement on -O0
compile time for our ObjC tests.

llvm-svn: 150208
2012-02-09 22:16:49 +00:00
Ted Kremenek 482080a621 [analyzer] Proactively avoid inlining vararg functions and blocks until we properly support them.
llvm-svn: 150207
2012-02-09 21:59:52 +00:00
Fariborz Jahanian 29082a5f1d objc: If a method is not implemented in the category implementation but
has been declared in its primary class, superclass,
or in one of their protocols, no need to issue unimplemented method. 
// rdar://10823023

llvm-svn: 150206
2012-02-09 21:30:24 +00:00
Johnny Chen f4a75d880d Fix compile time warnings for the inferior program.
llvm-svn: 150205
2012-02-09 20:29:11 +00:00
Eli Friedman 25b0742603 Make sure a variable with a C++ direct initializer triggers jump scope checking. Fixes PR10620 / <rdar://problem/9958362> .
llvm-svn: 150204
2012-02-09 20:13:14 +00:00
Greg Clayton 1fba8711b0 Added a logging helper class for SymbolFileDWARF::ParseType() that will
enable us to track the depth of parsing and what is being parsed. This
helps when trying to track down difficult type parsing issues and is only
enabled in non-production builds.

llvm-svn: 150203
2012-02-09 20:03:49 +00:00
Dylan Noblesmith aa1a64055b examples/analyzer-plugin/: unbreak build
It was never updated for API changes in r149311/r149336/r149339
and r147688.

llvm-svn: 150202
2012-02-09 20:02:49 +00:00
Dylan Noblesmith 9345813ddd cmake: create a relative symlink to clang, not absolute
Hardcoding the location of the build directory seems like it would
break at `make install`/packaging time.

llvm-svn: 150201
2012-02-09 20:02:46 +00:00
Akira Hatanaka 4984f5dbbe Class objects passed by value follow the same rules as structure objects.
Double fields of by-value class objects should be passed in floating point
registers.

llvm-svn: 150200
2012-02-09 19:54:16 +00:00
Benjamin Kramer 3edb3b4ac5 Kill the brief and full explanation fields from StaticDiagInfoRec. They were unused and wasted space for nothing.
- per PR11952.

llvm-svn: 150199
2012-02-09 19:38:26 +00:00
Johnny Chen 235df4f687 Setting terminal type to 'xterm' on Darwin; otherwise, to 'vt100'.
llvm-svn: 150198
2012-02-09 19:34:25 +00:00
David Blaikie 18544b9614 Change default error_code ctor to a 'named ctor' so it's more self-documenting.
Unify default construction of error_code uses on this idiom so that users don't
feel compelled to make static globals for naming convenience. (unfortunately I
couldn't make the original ctor private as some APIs don't return their result,
instead using an out parameter (that makes sense to default construct) - which
is a bit of a pity. I did, however, find/fix some cases of unnecessary default
construction of error_code before I hit the unfixable cases)

llvm-svn: 150197
2012-02-09 19:24:12 +00:00
Akira Hatanaka b6f7443c3c Fix bugs in function MipsABIInfo::returnAggregateInRegs. Functions returning
class objects follow the same rules as those returning struct objects.

llvm-svn: 150196
2012-02-09 18:49:26 +00:00
Johnny Chen acdde195fb Add error handling for missing option terminator "--" and a test scenario for it.
Also fix a logic error for a missing return stmt. Oops.

llvm-svn: 150195
2012-02-09 18:44:27 +00:00
Douglas Gregor 940a550f0d Don't allow deduction of a lambda result type from an initializer
list; it is not an expression.

llvm-svn: 150194
2012-02-09 18:40:39 +00:00
Argyrios Kyrtzidis e6a90e3c3d [libclang] Add a libclang test I neglected to commit.
llvm-svn: 150193
2012-02-09 18:31:22 +00:00
Argyrios Kyrtzidis cee840fa92 [PCH] Add a PCH test.
llvm-svn: 150192
2012-02-09 18:31:19 +00:00
Jakob Stoklund Olesen 4a6a0eec52 Add register mask support to RAGreedy.
This only adds the interference checks required for correctness.
We still need to take advantage of register masks for the
interference driven live range splitting.

llvm-svn: 150191
2012-02-09 18:25:05 +00:00
Douglas Gregor a30a0bc1db Tests for C++ [expr.prim.lambda]p5. We already implement all of these
semantics. 

llvm-svn: 150190
2012-02-09 18:19:44 +00:00
Devang Patel af8f33726b Now subprogram descriptors are not collected by llvm.dbg.sp NamedMDNode. Update document to reflect this change.
llvm-svn: 150187
2012-02-09 17:34:01 +00:00
Timur Iskhodzhanov 7ce3e5bb8e [asan] The first version of the RTL for Windows, reviewed at http://codereview.appspot.com/5647052
llvm-svn: 150185
2012-02-09 17:20:14 +00:00
Timur Iskhodzhanov bc9bb3f581 Test commit + fix an obvious typo
llvm-svn: 150184
2012-02-09 16:29:41 +00:00
Benjamin Kramer 1a4695a091 Tweak comment readability and grammar.
llvm-svn: 150183
2012-02-09 16:28:15 +00:00
Benjamin Kramer 5998c035ba Getting Started: Add a missing "cd ../..".
llvm-svn: 150181
2012-02-09 16:04:50 +00:00
Aaron Ballman 759c2a4360 Updated information on how to perform command line testing on Windows when built from MSVC.
llvm-svn: 150180
2012-02-09 15:23:18 +00:00
Sirish Pande 545983ea46 Test for commit access.
llvm-svn: 150178
2012-02-09 15:20:33 +00:00
Benjamin Kramer 487a3962c7 GlobalOpt: Be more aggressive about elminating side-effect free static dtors.
GlobalOpt runs early in the pipeline (before inlining) and complex class
hierarchies often introduce bitcasts or GEPs which weren't optimized away.
Teach it to ignore side-effect free instructions instead of depending on
other passes to remove them.

llvm-svn: 150174
2012-02-09 14:26:06 +00:00
Benjamin Kramer c602b6ecaf Store just the SimpleValueType in the generated VT tables for each register class, eliminating static ctors.
llvm-svn: 150173
2012-02-09 12:35:37 +00:00
Benjamin Kramer 541687f4be Remove unused fun.
llvm-svn: 150172
2012-02-09 12:05:18 +00:00
Alexey Samsonov 9654367cbc AddressSanitizer: move mach_override inside interception library
llvm-svn: 150171
2012-02-09 11:36:12 +00:00
Benjamin Kramer 8e012f5f22 Move the Name field in MCInstrDesc to the end, saving 8 bytes of padding per entry on x86_64.
No change on i386.

llvm-svn: 150170
2012-02-09 11:25:09 +00:00
James Molloy d9ba4fd48f Teach the MC and disassembler about SoftFail, and hook it up to UNPREDICTABLE on ARM. Wire this to tBLX in order to provide test coverage.
llvm-svn: 150169
2012-02-09 10:56:31 +00:00
Douglas Gregor 7345626a5b Implement return type deduction for lambdas per C++11
[expr.prim.lambda]p4, including the current suggested resolution of
core isue 975, which allows multiple return statements so long as the
types match. ExtWarn when user code is actually making use of this
extension.

llvm-svn: 150168
2012-02-09 10:18:50 +00:00
Craig Topper a0cd970b81 More tweaks to get the size of the X86 disassembler tables down.
llvm-svn: 150167
2012-02-09 08:58:07 +00:00
Douglas Gregor 410d6af994 Restore the appropriate lexical declaration context for a lambda's
function call operator (to the lambda class). This allows us to IRgen
calls to simple (non-capturing) lambdas, e.g.,

  [](int i, int j) -> int { return i + j; }(1, 2)

Eli will be providing test cases as he brings up more IRgen.

llvm-svn: 150166
2012-02-09 08:52:43 +00:00
Douglas Gregor 656bc62a73 Remove the "unsupported" error for lambda expressions. It's annoying,
and rapidly becoming untrue.

llvm-svn: 150165
2012-02-09 08:26:42 +00:00