Commit Graph

117826 Commits

Author SHA1 Message Date
Douglas Gregor 11bb308457 When typo-correction an Objective-C superclass name, don't
typo-correct to ourselves.

llvm-svn: 145583
2011-12-01 15:37:53 +00:00
Duncan Sands b8e6cee9ca Revert commit 145449 (ddunbar) since it is breaking the dragonegg buildbots.
Original commit message:
llvm-config: Replace with C++ version (was llvm-config-2).
 - Reapply of r144300, with lots of fixes/migration easement in between.

llvm-svn: 145582
2011-12-01 10:50:19 +00:00
Michael J. Spencer 0567b8ec58 Add Microsoft mangling of constructors and destructors. Patch by Dmitry!
llvm-svn: 145581
2011-12-01 09:55:00 +00:00
Francois Pichet d3b986df5d Change the Microsoft __interface keyword to be an alias for struct (not class) since members are public by default.
llvm-svn: 145580
2011-12-01 08:30:47 +00:00
Eric Christopher 9da7f305a4 For 64-bit the rest of the general regs are ok for the q constraint. Make
sure we can emit both the high and low versions of those registers.

Fixes rdar://10392864

llvm-svn: 145579
2011-12-01 08:12:41 +00:00
David Blaikie 3a15e14520 Add some missing anchors.
llvm-svn: 145578
2011-12-01 08:00:17 +00:00
Ted Kremenek dc6fb77d35 Fix typo.
llvm-svn: 145577
2011-12-01 07:39:23 +00:00
Anna Zaks c6aa531a8f [analyzer] Refactor checkers to use helper function for getting callee Decl and name.
We are getting name of the called function or it's declaration in a few checkers. Refactor them to use the helper function in the CheckerContext. 

llvm-svn: 145576
2011-12-01 05:57:37 +00:00
Ted Kremenek 24fc93a940 When analyzing a C++ method (without a specific caller), assume 'this' is non-null. Fixes <rdar://problem/10508787>.
llvm-svn: 145575
2011-12-01 05:29:42 +00:00
Eli Friedman f37bd2f2f1 Don't use a varargs convention for calls unprototyped functions where one of the arguments is an AVX vector.
llvm-svn: 145574
2011-12-01 04:53:19 +00:00
Eli Friedman d61887dd0a Pass AVX vectors which are arguments to varargs functions on the stack. <rdar://problem/10463281>.
llvm-svn: 145573
2011-12-01 04:49:21 +00:00
Pete Cooper 3b7f35bf08 Removed use of grep from test and moved it to be with other icmp tests
llvm-svn: 145570
2011-12-01 04:35:26 +00:00
Sean Callanan a5230ce303 Picked up a new revision of Clang to pull in Objective-C
enhancements.  With these enhancements, the return values
of Objective-C methods with unknown return types can be
implicitly cast to id for the purpose of making method
calls.

So what would have required this:

(int)[(id)[ClassWithNoDebugInfo methodReturningObject] methodReturningInt]

can now be written as:

(int)[[ClassWithNoDebugInfo methodReturningObject] methodReturningInt]

llvm-svn: 145567
2011-12-01 04:31:46 +00:00
Greg Clayton eaeaf6f906 <rdar://problem/10507811>
Avoid a crash for the new DW_OP_stack_value and DW_OP_implicit_value opcodes
that was due to an assertion.

llvm-svn: 145564
2011-12-01 04:06:15 +00:00
Pete Cooper bc5c524b71 Added instcombine pattern to spot comparing -val or val against 0.
(val != 0) == (-val != 0) so "abs(val) != 0" becomes "val != 0"

Fixes <rdar://problem/10482509>

llvm-svn: 145563
2011-12-01 03:58:40 +00:00
Greg Clayton b1a0292240 Bumping Xcode project version for lldb-91.
llvm-svn: 145561
2011-12-01 03:52:18 +00:00
Chad Rosier c24b86ffbe Propagate TargetLibraryInfo throughout ConstantFolding.cpp and
InstructionSimplify.cpp.  Other fixups as needed.
Part of rdar://10500969

llvm-svn: 145559
2011-12-01 03:08:23 +00:00
Jim Ingham f220d59399 If we are going to assert due to an unhanded opcode, stuff the opcode value into the CrashReporter string first.
llvm-svn: 145558
2011-12-01 03:01:30 +00:00
Argyrios Kyrtzidis f2d99b0d38 [libclang] Create a diagnostic set to pass at the end of indexing.
llvm-svn: 145557
2011-12-01 02:42:50 +00:00
Nick Lewycky e659b8459e Make use of "getScalarType()". No functionality change.
llvm-svn: 145556
2011-12-01 02:39:36 +00:00
Douglas Gregor a28bcddef6 Infer the submodule ID for a given declaration based on the location
of that declaration, and encode the submodule ID in each declaration
stored in an AST file.

llvm-svn: 145555
2011-12-01 02:07:58 +00:00
Sean Callanan 947ccc7396 Made symbol lookup in the expression parser more
robust:

- Now a client can specify what kind of symbols
  are needed; notably, this allows looking up
  Objective-C class symbols specifically.

- In the class of symbols being looked up, if
  one is non-NULL and others are NULL, LLDB now
  prefers the non-NULL one.

llvm-svn: 145554
2011-12-01 02:04:16 +00:00
Eli Friedman c1870b2633 Small fix for assembler generation on Darwin PPC64. Patch by Michael Kostylev. PR11437.
llvm-svn: 145553
2011-12-01 01:43:47 +00:00
Douglas Gregor d8fb1e30eb When sending a message to a receiver that has "unknown any" type,
force the unknown any type to "id" so that the message send can be
completed without requiring a case. Fixes <rdar://problem/10506646>.

llvm-svn: 145552
2011-12-01 01:37:36 +00:00
Argyrios Kyrtzidis 79d0428046 ParmVarDecls have no linkage. Previously we would report that parameters
in type signatures have external linkage.

Fixes rdar://10058317.

llvm-svn: 145551
2011-12-01 01:28:21 +00:00
Douglas Gregor 253eefe0df Switch the ID numbers used for submodule IDs in the AST reader over to
a standard global/local scheme, so that submodule definitions will
eventually be able to refer to submodules in other top-level
modules. We'll need this functionality soonish.

llvm-svn: 145549
2011-12-01 00:59:36 +00:00
Ted Kremenek 764d63ad94 Specially whitelist the selector 'addOperationWithBlock:' for the retain-cycle checking in -Warc-retain-cycles. This commonly
is hit by users using NSOperationQueue.  Fixes <rdar://problem/10465721>.

llvm-svn: 145548
2011-12-01 00:59:21 +00:00
Ted Kremenek 85825aebc9 Further tweak -Wurneachable-code and templates by allowing the warning to run on
explicit template specializations (which represent actual functions somebody wrote).

Along the way, refactor some other code which similarly cares about whether or
not they are looking at a template instantiation.

llvm-svn: 145547
2011-12-01 00:59:17 +00:00
Eli Friedman 83a1258342 Fix MSVC class layout for empty classes. Patch by Dmitry Sokolov.
llvm-svn: 145544
2011-12-01 00:37:01 +00:00
Howard Hinnant dc82cca6bf Updated heuristic regulating small string buffer
llvm-svn: 145543
2011-12-01 00:08:59 +00:00
Douglas Gregor 1da6f4b435 Another GCC fix
llvm-svn: 145542
2011-11-30 23:48:34 +00:00
Richard Smith b3041feaf7 Revert most of r145372 for now. Lookahead beyond the ';' in a function
declaration tickles a bug in the way we handle visibility pragmas.

The improvement to error recovery for template function definitions declared
with the 'typedef' specifier in r145372 is unrelated and not reverted here.

llvm-svn: 145541
2011-11-30 23:45:35 +00:00
Douglas Gregor ef42154c17 Unbreak build with GCC. Clang is too lame to diagnose this particular ill-formedness
llvm-svn: 145539
2011-11-30 23:29:56 +00:00
Douglas Gregor de3ef502a9 Promote ModuleMap::Module to a namespace-scope class in the Basic
library, since modules cut across all of the libraries. Rename
serialization::Module to serialization::ModuleFile to side-step the
annoying naming conflict. Prune a bunch of ModuleMap.h includes that
are no longer needed (most files only needed the Module type).

llvm-svn: 145538
2011-11-30 23:21:26 +00:00
Johnny Chen 60e2c6aa43 rdar://problem/10501020
ClangASTSource::~ClangASTSource() was calling

    ClangASTContext *scratch_clang_ast_context = m_target->GetScratchClangASTContext();

which had the side effect of deleting this very ClangASTSource instance.  Not good.
Change it to

    // We are in the process of destruction, don't create clang ast context on demand
    // by passing false to Target::GetScratchClangASTContext(create_on_demand).
    ClangASTContext *scratch_clang_ast_context = m_target->GetScratchClangASTContext(false);

The Target::GetScratchClangASTContext(bool create_on_demand=true) has a new signature.

llvm-svn: 145537
2011-11-30 23:18:53 +00:00
Argyrios Kyrtzidis b9e53ed4e2 [PCH] In ASTReader::FinishedDeserializing, after we do PassInterestingDeclsToConsumer
we may end up having added more pending stuff to do, so go in a loop until everything
is cleared out.

This fixes the error in rdar://10278815 which has a certain David Lynch-esque quality..

  error: unknown type name 'BOOL'; did you mean 'BOOL'?

llvm-svn: 145536
2011-11-30 23:18:26 +00:00
Jim Grosbach 8eeb353071 Replace an assert() with an actual diagnostic.
llvm-svn: 145535
2011-11-30 23:16:25 +00:00
Lang Hames d8bcb2b808 Test case for fix committed in r145441.
llvm-svn: 145534
2011-11-30 23:03:25 +00:00
Kostya Serebryany f318e29102 test asan at -O0
llvm-svn: 145532
2011-11-30 22:27:30 +00:00
Kostya Serebryany d47685769e make asan work at -O0, clang part. Patch by glider@google.com
llvm-svn: 145531
2011-11-30 22:20:21 +00:00
Kostya Serebryany dc436f95d2 make asan work at -O0, llvm part. Patch by glider@google.com
llvm-svn: 145530
2011-11-30 22:19:26 +00:00
Greg Clayton e54399dbdf Bumped Xcode project versions for lldb-90 and debugserver-154
llvm-svn: 145528
2011-11-30 22:18:41 +00:00
Sean Callanan 09ab4b777c Added support to the Objective-C language runtime
to find Objective-C class types by looking in the
symbol tables for the individual object files.

I did this as follows:

- I added code to SymbolFileSymtab that vends
  Clang types for symbols matching the pattern
  "_OBJC_CLASS_$_NSMyClassName," making them
  appear as Objective-C classes.  This only occurs
  in modules that do not have debug information,
  since otherwise SymbolFileDWARF would be in
  charge of looking up types.

- I made a new SymbolVendor subclass for the
  Apple Objective-C runtime that is in charge of
  making global lookups of Objective-C types.  It
  currently just sends out type lookup requests to
  the appropriate SymbolFiles, but in the future we
  will probably extend it to query the runtime more
  completely.

I also modified a testcase whose behavior is changed
by the fact that we now actually return an Objective-C
type for __NSCFString.

llvm-svn: 145526
2011-11-30 22:11:59 +00:00
Jan Sjödin 9430e284a9 Support for encoding all FMA4 instructions and tablegen patterns for all
remaining FMA4 instructions and intrinsics with tests.

llvm-svn: 145525
2011-11-30 22:09:42 +00:00
Ted Kremenek f551f326fc Per an offline conversation with John McCall, have StmtPrinter actually print out the source expression for OpaqueValueExpr.
llvm-svn: 145524
2011-11-30 22:08:08 +00:00
Eli Friedman 6cff9df298 Make GlobalMerge honor the preferred alignment on globals without an explicitly specified alignment.
<rdar://problem/10497732>.

llvm-svn: 145523
2011-11-30 21:54:15 +00:00
Bill Wendling ad8b58b2ac More cleanups. No content change.
llvm-svn: 145522
2011-11-30 21:52:43 +00:00
Bill Wendling b6c2220600 Minor cleanup. No content change.
llvm-svn: 145521
2011-11-30 21:43:43 +00:00
Ted Kremenek 7f770032c7 Don't run -Wunreachable-code on template instantiations. Different instantiations may produce different unreachable code results, and it is very difficult for us to prove that ALL instantiations of a template have specific unreachable code. If we come up with a better solution, then we can revisit this, but this approach will at least greatly reduce the noise of this warning for code that makes use of templates.
llvm-svn: 145520
2011-11-30 21:22:09 +00:00
Bob Wilson a0c69014f8 Remove the install-clang-c makefile target.
When I did this before it broke a buildbot that was testing that target, but
we've removed that buildbot now.

llvm-svn: 145519
2011-11-30 21:06:12 +00:00