Commit Graph

120959 Commits

Author SHA1 Message Date
Talin 77c4ff2182 Additional methods for SmallString.
llvm-svn: 148881
2012-01-24 23:43:59 +00:00
Howard Hinnant abc770690a By changing all of the throw() specs to noexcept I've been able to compile and link all of the source files into a dylib. Prior to this substitution the changed functions were calling __cxa_call_unexpected which isn't implemented yet. However in none of these cases do we actaully want __cxa_call_unexpected to be called. Primative buildit script added.
llvm-svn: 148880
2012-01-24 23:42:30 +00:00
Jakob Stoklund Olesen 1b8e437ab6 Set correct <def,undef> flags when lowering REG_SEQUENCE.
A REG_SEQUENCE instruction is lowered into a sequence of partial defs:

  %vreg7:ssub_0<def,undef> = COPY %vreg20:ssub_0
  %vreg7:ssub_1<def> = COPY %vreg2
  %vreg7:ssub_2<def> = COPY %vreg2
  %vreg7:ssub_3<def> = COPY %vreg2

The first def needs an <undef> flag to indicate it is the beginning of
the live range, while the other defs are read-modify-write.  Previously,
we depended on LiveIntervalAnalysis to notice and fix the missing
<def,undef>, but that solution was never robust, it was causing problems
with ProcessImplicitDefs and the lowering of chained REG_SEQUENCE
instructions.

This fixes PR11841.

llvm-svn: 148879
2012-01-24 23:28:42 +00:00
Jakob Stoklund Olesen 66ef9ad33f Use the standard MachineFunction::print() after SlotIndexes.
llvm-svn: 148878
2012-01-24 23:28:38 +00:00
Johnny Chen 5f3bf63cac Fix a typo in the error message of the StopInfoWatchpoint class.
llvm-svn: 148876
2012-01-24 23:19:25 +00:00
Akira Hatanaka d7970f9e4b Sign-extend 32-bit integer arguments when they are passed in 64-bit registers,
which is what N32/64 does.

llvm-svn: 148875
2012-01-24 23:18:43 +00:00
Eli Friedman 946b7b5bc8 Switch PerformImplicitConversion over to use DefaultLvalueConversion for lvalue-to-rvalue conversion.
llvm-svn: 148874
2012-01-24 22:51:26 +00:00
Jean-Daniel Dupas 78536ae5b5 Replace a hack to handle NSLog/NSLogv in sema by declaring them as Library Builtins.
llvm-svn: 148873
2012-01-24 22:32:46 +00:00
Jean-Daniel Dupas 5778cb8e06 Remove trailing slash in front of header name of ObjC builtins.
llvm-svn: 148872
2012-01-24 22:29:27 +00:00
Akira Hatanaka 7e6c195c11 Pass CCState by reference.
llvm-svn: 148871
2012-01-24 22:07:36 +00:00
Sean Callanan 175a0d04b6 Added a mechanism for the IR interpreter to return
an error along with its boolean result.  The
expression parser reports this error if the 
interpreter fails and the expression could not be
run in the target.

llvm-svn: 148870
2012-01-24 22:06:48 +00:00
Akira Hatanaka 77dbd786c8 Pattern for f32 to i64 conversion.
llvm-svn: 148869
2012-01-24 22:05:25 +00:00
Anna Zaks b3d896d333 [analyzer] Add the HTML file to the SATest diagnostic diff.
(Uses the functionality which has been in CmpRuns long before.)

llvm-svn: 148868
2012-01-24 21:57:35 +00:00
Anna Zaks 895c312404 [analyzer] Testing: make diagnostic diffs more informative (add
diagnostic message).

llvm-svn: 148867
2012-01-24 21:57:32 +00:00
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