Commit Graph

120845 Commits

Author SHA1 Message Date
Howard Hinnant 7fdfd5d269 Add some needed symbols in exception.cpp and eliminate dependence upon uncaught_exception() from cxa_vector.cpp. libc++abi is very nearly a self-contained (though not complete) library now.
llvm-svn: 148866
2012-01-24 21:48:10 +00:00
Jim Grosbach 35bc8f9159 ARM Darwin symbol ref differences w/o subsection-via-symbols.
When not using subsections via symbols, the assembler can resolve
symbol differences (including pcrel references) to non-local
labels at assembly time, not just those in the same atom.

llvm-svn: 148865
2012-01-24 21:45:25 +00:00
Devang Patel a410ed3ced Intel Syntax: Extend special hand coded logic, to recognize special instructions, for intel syntax.
llvm-svn: 148864
2012-01-24 21:43:36 +00:00
Howard Hinnant 73ab1864ef Marshall Clow reminded me that fallback_malloc.cpp was broken out for testing purposes. We've agreed to simply rename fallback_malloc.cpp to fallback_malloc.ipp. Thanks Marshall.
llvm-svn: 148863
2012-01-24 21:41:27 +00:00
Akira Hatanaka 9f7ec1538f 64-bit sign extension in register instructions.
llvm-svn: 148862
2012-01-24 21:41:09 +00:00
Argyrios Kyrtzidis 3698cef19f [libclang] In clang::getCursorKindForDecl() don't return "UnexposedDecl"
for forward references of classes and protocols, this breaks libclang API usage.

rdar://10747438.

llvm-svn: 148861
2012-01-24 21:39:26 +00:00
Howard Hinnant 421bbe5cc5 Add some needed symbols to cxa_new_delete.cpp and put the display() stuff under #DEBUG (again).
llvm-svn: 148860
2012-01-24 21:35:18 +00:00
Ted Kremenek 6fa5727939 Teach scanf/printf checking about '%Ld' and friends (a GNU extension). Fixes PR 9466.
llvm-svn: 148859
2012-01-24 21:29:54 +00:00
Nick Lewycky 3c1c7952b1 Force triple on these tests to pacify the windows tester.
llvm-svn: 148858
2012-01-24 21:28:47 +00:00
Nick Lewycky 411fc65b45 Add a new warning, -Wover-aligned, which detects attempts to use the default
allocator to construct an object which declares more alignment than the default
allocator actually provides. Fixes PR9527!

llvm-svn: 148857
2012-01-24 21:15:41 +00:00
Jim Grosbach 0bba00dc2f Tidy up. Trailing whitespace.
llvm-svn: 148856
2012-01-24 21:06:59 +00:00
Howard Hinnant 378a59f15c Got fooled by fallback_malloc.cpp source file: it is really a private header. I've manually included it into the only place it is used: cxa_exception.cpp.
llvm-svn: 148854
2012-01-24 21:02:21 +00:00
Howard Hinnant 8b26c3713b Add new file for public type_info-related signatures
llvm-svn: 148853
2012-01-24 21:01:01 +00:00
Chandler Carruth 96bae7b1fd Fix one of the (larger) FIXMEs where we were misusing the Driver's idea
of the target triple to stand in for the "host" triple.

Thanks to a great conversation with Richard Smith, I'm now much more
confident in how this is proceeding. In all of the places where we
currently reason about the "host" architecture or triple, what we really
want to reason about in the detected GCC installation architecture or
triple, and the ways in which that differs from the target. When we find
a GCC installation with a different triple from our target *but capable
of targeting our target* through an option such as '-m64', we want to
detect *that* case and change the paths within the GCC installation (and
libstdc++ installation) to reflect this difference.

This patch makes one function do this correctly. Subsequent commits will
hoist the logic used here into the GCCInstallation utility, and then
reuse it through the rest of the toolchains to fix the remaining places
where this is currently happening.

llvm-svn: 148852
2012-01-24 20:08:17 +00:00
Howard Hinnant 0d517a4278 CrashReporterClient.h is back, but this time protected with __has_include. Thanks for the suggestion Doug. The use is consistent with how the same header is used in llvm/lib/Support/PrettyStackTrace.cpp (though there autoconfig is used instead of __has_include).
llvm-svn: 148851
2012-01-24 19:58:25 +00:00
Kaelyn Uhrain 9ce58bd757 Small code cleanup/simplification in Sema::ClassifyName.
llvm-svn: 148850
2012-01-24 19:45:35 +00:00
Matt Beaumont-Gay 88297ef665 Sink assert-only variables into the asserts
llvm-svn: 148849
2012-01-24 19:43:30 +00:00
Argyrios Kyrtzidis d0a27f717e [libclang] When calling clang_getCursorReferenced on a class or protocol
forward reference, do give an interface or protocol cursor back, don't give
an 'UnexposedDecl' one.

rdar://10743193

llvm-svn: 148848
2012-01-24 19:40:15 +00:00
Fariborz Jahanian e2a7776eff objc: Issue a generic diagnostic assigning to
an objc object in any abi mode.

llvm-svn: 148847
2012-01-24 19:40:13 +00:00
Kostya Serebryany c11d1dd133 [asan] enable asan only for the functions that have Attribute::AddressSafety
llvm-svn: 148846
2012-01-24 19:34:43 +00:00
Anna Zaks bf740512ec [analyzer] Add more C taint sources/sinks.
llvm-svn: 148844
2012-01-24 19:32:25 +00:00
Chandler Carruth 4d9d76839a Address one part of the FIXME I introduced my switching the triple
inside of GCCInstallation to be a proper llvm::Triple. This is still
a touch ugly because we have to use it as a string in so many places,
but I think on the whole the more structured representation is better.

Comments of course welcome if this tradeoff isn't working for folks.

llvm-svn: 148843
2012-01-24 19:28:29 +00:00
Kostya Serebryany 588d6abf7d The following patch adds __attribute__((no_address_safety_analysis)) which will allow to disable
address safety analysis (such as e.g. AddressSanitizer or SAFECode) for a specific function.

When building with AddressSanitizer, add AddressSafety function attribute to every generated function
except for those that have __attribute__((no_address_safety_analysis)).

With this patch we will be able to
1. disable AddressSanitizer for a particular function
2. disable AddressSanitizer-hostile optimizations (such as some cases of load widening) when AddressSanitizer is on.

llvm-svn: 148842
2012-01-24 19:25:38 +00:00
Chandler Carruth 64cee06504 At least within these classes, consistently spell 'GCC' as 'GCC'.
I can't read Java-style 'Gcc' acronyms. ;]

No functionality changed.

llvm-svn: 148840
2012-01-24 19:21:42 +00:00
Chandler Carruth 46f204fef8 Start hoisting the logic for computing the target triple into its own
function. The logic for this, and I want to emphasize that this is the
logic for computing the *target* triple, is currently scattered
throughout various different HostInfo classes ToolChain factoring
functions. Best part, it is largely *duplicated* there. The goal is to
hoist all of that up to here where we can deal with it once, and in
a consistent manner.

Unfortunately, this uncovers more fun problems: the ToolChains assume
that the *actual* target triple is the one passed into them by these
factory functions, while the *host* triple is the one in the driver.
This already was a lie, and a damn lie, when the '-target' flag was
specified. It only really worked when the difference stemmed from '-m32'
and '-m64' flags. I'll have to fix that (and remove all the FIXMEs I've
introduced here to document the problem) before I can finish hoisting
the target-calculation logic.

It's bugs all the way down today it seems...

llvm-svn: 148839
2012-01-24 19:17:46 +00:00
Douglas Gregor 3ecbc3d655 Promote the extension warning for attempts to catch a reference or
pointer to incomplete type from an ExtWarn to an error. We put the
ExtWarn in place as part of a workaround for Boost (PR6527), but it
(1) doesn't actually match a GCC extension and (2) has been fixed for
two years in Boost, and (3) causes us to emit code that fails badly at
run time, so it's a bad idea to keep it. Fixes PR11803.

llvm-svn: 148838
2012-01-24 19:01:26 +00:00
Jim Grosbach 8e2722cdb0 NEON VST4(one lane) assembly parsing and encoding.
llvm-svn: 148836
2012-01-24 18:53:13 +00:00
Owen Anderson d845d9d9e9 Widen the instruction encoder that TblGen emits to a 64 bits, which should accomodate every target I can think of offhand.
llvm-svn: 148833
2012-01-24 18:37:29 +00:00
Jim Grosbach 14952a0e32 NEON VLD4(one lane) assembly parsing and encoding.
llvm-svn: 148832
2012-01-24 18:37:25 +00:00
Douglas Gregor 95d8283931 When importing a RecordDecl as a DeclContext, make sure that we pull
in the definition as well.

llvm-svn: 148831
2012-01-24 18:36:04 +00:00
Howard Hinnant a9d8ec45f6 Remove dependence upon std::exception_ptr from the default_terminate_handler. Recovered the equivalent functionality at a lower level.
llvm-svn: 148830
2012-01-24 18:26:29 +00:00
Howard Hinnant 9e5d74b239 Forgot to include this file in the last commit: Move kOurExceptionClass and kOurDependentExceptionClass from source to header so that they can be used in multiple sources. This is a private header, these constants are not publicly exposed.
llvm-svn: 148829
2012-01-24 18:17:40 +00:00
Howard Hinnant 6830b2a493 Move kOurExceptionClass and kOurDependentExceptionClass from source to header so that they can be used in multiple sources. This is a private header, these constants are not publicly exposed.
llvm-svn: 148827
2012-01-24 18:15:20 +00:00
Jakob Stoklund Olesen 5b9deabae8 Fix old doxygen comment.
llvm-svn: 148825
2012-01-24 18:09:18 +00:00
Jakob Stoklund Olesen 60e70e8fcf Add an (interleave A, B, ...) SetTheory operator.
This will interleave the elements from two or more lists.

llvm-svn: 148824
2012-01-24 18:06:05 +00:00
Fariborz Jahanian 3c4225a858 objc: issue error if assigning objects in fragile-abi too.
// rdar://10731065

llvm-svn: 148823
2012-01-24 18:05:45 +00:00
Chandler Carruth beb3e7e076 Undo an over zealous rename. This bit of the CMake build really is
dealing in the host triple, be honest about it and document the decision
to default the target triple to the host triple unless overridden.

llvm-svn: 148822
2012-01-24 18:00:44 +00:00
Jim Grosbach 3cfef8d467 NEON Two-operand assembly aliases for VSRA.
llvm-svn: 148821
2012-01-24 17:55:36 +00:00
Jim Grosbach 9ca3a067c8 Remove redundant test file.
llvm-svn: 148820
2012-01-24 17:55:32 +00:00
Jim Grosbach 7ae12cc546 NEON Two-operand assembly aliases for VSLI.
llvm-svn: 148819
2012-01-24 17:49:15 +00:00
Jim Grosbach 7b6f0f67aa NEON Two-operand assembly aliases for VSRI.
llvm-svn: 148818
2012-01-24 17:46:58 +00:00
Jim Grosbach 1395b67e3b Tidy up.
llvm-svn: 148817
2012-01-24 17:46:54 +00:00
Douglas Gregor 2aa53777e7 Teach the AST importer about redeclaration chains for Objective-C
classes and protocols, implementing lazy-import semantics for both.

llvm-svn: 148816
2012-01-24 17:42:07 +00:00
Jim Grosbach 681db34eae NEON add correct predicates for some asm aliases.
llvm-svn: 148815
2012-01-24 17:23:29 +00:00
Tobias Grosser 9bc5eb08c2 CodeGen: Separate declaration and definition of ClastStmtCodeGen
llvm-svn: 148814
2012-01-24 16:42:32 +00:00
Tobias Grosser bb137e3f03 CodeGen: Separate declaration and definition of ClastExpCodeGen
llvm-svn: 148813
2012-01-24 16:42:28 +00:00
Tobias Grosser e5b4232572 CodeGen: Use getNullValue to simplify some code
llvm-svn: 148812
2012-01-24 16:42:25 +00:00
Tobias Grosser 70e8cdbbd1 CodeGen: Separate declaration and definitions of BlockGenerator
llvm-svn: 148811
2012-01-24 16:42:21 +00:00
Tobias Grosser 28dd48613e ScopInfo: Add isStrideX to unify stride checking
llvm-svn: 148810
2012-01-24 16:42:16 +00:00
David Blaikie 5c9a69fd1a Reword comment based on feedback by Duncan Sands.
llvm-svn: 148809
2012-01-24 16:18:30 +00:00