Commit Graph

40784 Commits

Author SHA1 Message Date
Logan Chien 57086ce248 Fix PR 11709: Change the definition of va_list to meet AAPCS requirement
AAPCS ABI Section 7.1.4 [1] specifies that va_list
should be defined as struct __va_list { void *__ap;};
And in C++, it is defined in namespace std.

[1] http://infocenter.arm.com/help/topic
         /com.arm.doc.ihi0042d/IHI0042D_aapcs.pdf

Patch by Weiming Zhao.

llvm-svn: 165609
2012-10-10 06:56:20 +00:00
Bill Wendling 59068d1302 Place temporary LTO files into their own subdirectory.
llvm-svn: 165600
2012-10-10 05:30:49 +00:00
Bill Wendling 73e465e148 Have 'addFnAttr' take the attribute enum value. Then have it build the attribute object and add it appropriately. No functionality change.
llvm-svn: 165596
2012-10-10 03:13:20 +00:00
Argyrios Kyrtzidis 15f6b8ebe8 Disable the preprocessing record when indexing a source file
and modules are not enabled.

llvm-svn: 165593
2012-10-10 02:12:50 +00:00
Argyrios Kyrtzidis e445c7236e When indexing a module file, for the ppIncludedFile callback give
an invalid location if the location points to the synthetic buffer
for the module input.

llvm-svn: 165592
2012-10-10 02:12:47 +00:00
Argyrios Kyrtzidis 130190ffff [modules] Consistently construct a buffer as input to build the module.
This means the main file for modules will always be a virtual one.

llvm-svn: 165591
2012-10-10 02:12:39 +00:00
Richard Smith 8772bd8569 Tidy up formatting.
llvm-svn: 165584
2012-10-10 01:12:11 +00:00
Richard Smith 481652b3e3 -fcatch-undefined-behavior: catch a VLA bound which evalutes to a non-positive value.
llvm-svn: 165583
2012-10-10 01:11:12 +00:00
Richard Smith fe782158b2 Fix test broken by r165572.
llvm-svn: 165581
2012-10-10 01:02:07 +00:00
Bob Wilson 0e504ff797 Revert "Use a special path to place the .o files in."
This reverts commit 165429 in an attempt to get our buildbots going.

llvm-svn: 165573
2012-10-09 23:57:08 +00:00
Richard Smith 683398a3b6 -fcatch-undefined-behavior: store the type name directly at the end of a type descriptor. 5% binary size reduction due to fewer relocations.
llvm-svn: 165572
2012-10-09 23:55:19 +00:00
Michael Liao 638d03de17 Add extra vim swap file pattern
llvm-svn: 165570
2012-10-09 23:48:58 +00:00
Douglas Gregor cb28f9d7ad Rework the (de-)serialization of macros, as stored in
MacroInfo*. Instead of simply dumping an offset into the current file,
give each macro definition a proper ID with all of the standard
modules-remapping facilities. Additionally, when a macro is modified
in a subsequent AST file (e.g., #undef'ing a macro loaded from another
module or from a precompiled header), provide a macro update record
rather than rewriting the entire macro definition. This gives us
greater consistency with the way we handle declarations, and ties
together macro definitions much more cleanly.

Note that we're still not actually deserializing macro history (we
never were), but it's far easy to do properly now.

llvm-svn: 165560
2012-10-09 23:05:51 +00:00
Eli Friedman bbbbac6012 People put pragmas in crazy places; add more handling. PR14046.
I think our general framework for parser pragmas needs a bit more work,
but I'm not planning on working on it at the moment.

llvm-svn: 165558
2012-10-09 22:46:54 +00:00
Benjamin Kramer 79da0f0c4d Initialize the end loc in ObjCInterfaceTypeLoc.
Found by valgrind.

llvm-svn: 165546
2012-10-09 20:49:29 +00:00
Rafael Espindola fc3fc0c936 The clang driver has a fairly fancy support for executing gcc instead of
clang itself. This dates back to clang's early days and while it looks like
some of it is still used (for kext for example), other parts are probably dead.

Remove the -ccc-clang-archs option and associated code. I don't think there
is any remaining setup where clang doesn't support an architecture but it can
expect an working gcc cross compiler to be available.

A nice side effect is that tests no longer need to differentiate architectures
that are included in production builds of clang and those that are not.

llvm-svn: 165545
2012-10-09 20:46:28 +00:00
Argyrios Kyrtzidis a7a108173f Simplify the code using SmallVector::append(), as suggested by Benjamin Kramer.
llvm-svn: 165538
2012-10-09 20:08:43 +00:00
Chad Rosier 31753473a6 [driver] Remove redundant cases due to overlapping commits between Ted (r165531, 165532) and I
(r165534), but leave the test case in place.

llvm-svn: 165537
2012-10-09 20:01:58 +00:00
Richard Smith e30752c93b -fcatch-undefined-behavior: emit calls to the runtime library whenever one of the checks fails.
llvm-svn: 165536
2012-10-09 19:52:38 +00:00
Chad Rosier 3530682558 [driver] Remove the -W[no-][int-conversion|constant-conversion|enum-conversion]
options when clang invokes cc1plus for i386 kexts.
rdar://12459188

llvm-svn: 165534
2012-10-09 19:43:33 +00:00
Ted Kremenek a88397d9ba Don't forward -Wenum-conversion to cc1plus.
llvm-svn: 165532
2012-10-09 19:29:48 +00:00
Ted Kremenek b476241840 Don't forward -Wint-conversion to cc1plus.
llvm-svn: 165531
2012-10-09 19:29:46 +00:00
Ted Kremenek aa4ca653ae Create variable for warning group -Wshorten-64-to-32.
llvm-svn: 165521
2012-10-09 18:46:14 +00:00
Argyrios Kyrtzidis 353f6a477e Move the functionality that looks for ObjC overridden methods from
ASTContext to the ObjCMethodDecl, and have the more generic
ASTContext::getOverriddenMethods() use the ObjCMethodDecl::getOverriddenMethods()
function.

llvm-svn: 165518
2012-10-09 18:19:01 +00:00
Douglas Gregor 7c0990ba35 Make the order of visitation of the pending bodies in the AST reader
deterministic.

llvm-svn: 165515
2012-10-09 17:50:23 +00:00
Douglas Gregor a6017bbd52 When we load a function or method body from an AST file, we check
whether that function/method already has a body (loaded from some
other AST file), as introduced in r165137. Delay this check until
after the redeclaration chains have been wired up.

While I'm here, make the loading of method bodies lazy.

llvm-svn: 165513
2012-10-09 17:21:28 +00:00
Alexey Samsonov be5ae06dec Fixup for r165097: build 32-bit ASan compiler-rt library on 64-bit Linux only if just-built clang can build simple 32-bit executables
llvm-svn: 165503
2012-10-09 16:03:52 +00:00
Douglas Gregor 8cb174654f If a macro has been #undef'd in a precompiled header, we still need to
write out the macro history for that macro. Similarly, we need to cope
with reading a macro definition that has been #undef'd.

Take advantage of this new ability so that global code-completion
results can refer to #undef'd macros, rather than losing them
entirely. For multiply defined/#undef'd macros, we will still get the
wrong result, but it's better than getting no result.

llvm-svn: 165502
2012-10-09 16:01:50 +00:00
Benjamin Kramer 97e5949068 Clearing a SmallPtrSet is still expensive, split it out from OverloadCandidateSet::clear and don't do it on destruction.
llvm-svn: 165501
2012-10-09 15:52:25 +00:00
Bill Wendling 0597c1e53c We use the enums to query whether an Attributes object has that attribute. The
opaque layer is responsible for knowing where that specific attribute is stored.

llvm-svn: 165489
2012-10-09 07:45:26 +00:00
Arnaud A. de Grandmaison 3b95e4da76 CXXMethodDecl::isConst() and CXXMethodDecl::isVolatile() can be const methods
Patch by: Laszlo Nagy

llvm-svn: 165486
2012-10-09 07:09:56 +00:00
Argyrios Kyrtzidis b9556e695f Move the logic that searches for overridden methods from libclang to
ASTContext so that it can be widely available.

llvm-svn: 165473
2012-10-09 01:23:50 +00:00
Argyrios Kyrtzidis cc4ca0a324 When storing the C++ overridden methods, store them once for the
canonical method; avoid storing them again for an out-of-line definition.

llvm-svn: 165472
2012-10-09 01:23:45 +00:00
Eli Friedman ae8ee25d8d Make sure we allow "#pragma options align=mac68k" in function-local contexts. <rdar://problem/12453134>
llvm-svn: 165462
2012-10-08 23:52:38 +00:00
Ted Kremenek 40a69600af Add regression test to check if -Wenum-conversion is a subgroup of -Wconversion.
llvm-svn: 165459
2012-10-08 23:45:09 +00:00
Argyrios Kyrtzidis e0d649789d In VarDecl::getSourceRange() make sure to check that the source location
of the initializer is valid before using it.

Fixes rdar://12455002&12449015 where local variables of objc objects in ARC mode
were not annotated because of the ImplicitValueInitExpr initializer having invalid
source range, resulting in the SourceRange of the VarDecl having invalid end location.

llvm-svn: 165456
2012-10-08 23:08:41 +00:00
Chandler Carruth 37a29140d7 Actually add the -Wenum-conversion group to -Wconversion as r165361
seems to have intended.

llvm-svn: 165440
2012-10-08 22:45:55 +00:00
Chandler Carruth 9e1440c960 Sort the subgroups of the diagnostic group for -Wconversion. No
functionality changed.

llvm-svn: 165439
2012-10-08 22:45:54 +00:00
Chandler Carruth c0f5cd1928 Make Bitrig's clang understand -stdlib= correctly.
With this patch Bitrig can use a different c++ library without pain and
within the normal commandline parameters.

Original patch by David Hill, with lots of fixes and cleanup by me.

llvm-svn: 165430
2012-10-08 21:31:38 +00:00
Bill Wendling 99b0092a40 Use a special path to place the .o files in.
llvm-svn: 165429
2012-10-08 21:17:59 +00:00
Daniel Jasper 6b108a617d CompilationDatabaseTest: Fix another Windows path issue.
llvm-svn: 165425
2012-10-08 20:32:51 +00:00
Daniel Jasper 5697f99f98 CompilationDatabase: Use //net paths for tests, as they should be
considered absolute on all platforms.

llvm-svn: 165422
2012-10-08 20:08:25 +00:00
Benjamin Kramer bdd74bfb9f Don't emit double parentheses in __clang_version__.
PR14040.

llvm-svn: 165415
2012-10-08 18:49:39 +00:00
Daniel Jasper 8c059026c0 Hopefully appease Windows buildbot with Japanese (?) error message.
llvm-svn: 165414
2012-10-08 18:37:21 +00:00
Daniel Jasper fddb32c3d6 FileNameMatchTrie: Use StringRef instead of Twines where possible.
llvm-svn: 165412
2012-10-08 18:31:54 +00:00
Micah Villmow dd31ca10ef Move TargetData to DataLayout.
llvm-svn: 165395
2012-10-08 16:25:52 +00:00
Daniel Jasper 26cf9c4379 Support symlinks and relative paths in complilation databases.
Review: http://llvm-reviews.chandlerc.com/D30
llvm-svn: 165392
2012-10-08 16:08:15 +00:00
David Blaikie dac86fd24c Use a single note diagnostic for all the precedent/parentheses warnings.
llvm-svn: 165384
2012-10-08 01:19:49 +00:00
David Blaikie 1d202a6bae StringRef-ify Binary/UnaryOperator::getOpcodeStr
llvm-svn: 165383
2012-10-08 01:11:04 +00:00
Benjamin Kramer 8aa41a0908 Python bindings: fix typo.
llvm-svn: 165375
2012-10-07 11:51:45 +00:00