Dmitry Vyukov
2d4e3c140f
tsan: do not clean stack/tls for main thread
...
llvm-svn: 157566
2012-05-28 07:44:34 +00:00
Dmitry Vyukov
9b13e9f3b5
asan: remove static libraries on make clean
...
llvm-svn: 157565
2012-05-28 07:43:36 +00:00
Bill Wendling
1560517ec3
Implement the indirect counter increment code in a better way. Instead of
...
replicating the code for every place it's needed, we instead generate a function
that does that for us. This function is local to the executable, so there
shouldn't be any writing violations.
llvm-svn: 157564
2012-05-28 06:10:56 +00:00
Filipe Cabecinhas
2137c928b0
Remove all written files
...
llvm-svn: 157562
2012-05-28 04:07:56 +00:00
Charles Davis
ee855f06e7
Fix Lang's fix. This should fix the tests for +Asserts builds.
...
llvm-svn: 157561
2012-05-28 03:54:22 +00:00
Bill Wendling
f16084723c
Don't use 'strrchr', which isn't implemented here yet.
...
llvm-svn: 157560
2012-05-28 02:50:53 +00:00
Bill Wendling
74f987f3b6
Sync with old GCOV runtime library's file.
...
llvm-svn: 157559
2012-05-28 02:34:34 +00:00
Chris Lattner
a2db6f2bd8
adjust to mainline llvm API change.
...
llvm-svn: 157557
2012-05-28 01:47:53 +00:00
Chris Lattner
3cb6f83ebb
switch AttrListPtr::get to take an ArrayRef, simplifying a lot of clients.
...
llvm-svn: 157556
2012-05-28 01:47:44 +00:00
Chris Lattner
5be972d8a2
simplify code.
...
llvm-svn: 157555
2012-05-28 01:37:08 +00:00
Chris Lattner
9a49ffdb47
add some helper methods to make the type more uniform.
...
llvm-svn: 157554
2012-05-28 01:29:59 +00:00
David Blaikie
c4c0e8aa9a
Fix PR12960 by not attempting to correct cases when we're not actually instantiatiating a template.
...
This comes up in the begin/end calls of a range-for (see the included test
case). Other suggestions are welcome, though this seems to do the trick without
regressing anything.
llvm-svn: 157553
2012-05-28 01:26:45 +00:00
Charles Davis
7fb195b683
Test case for 157547. Before that patch, all the digits would be mangled
...
as zeroes. Now the digits are properly non-zero.
llvm-svn: 157552
2012-05-28 00:43:56 +00:00
Chris Lattner
ff9e08baf9
rdar://11542750 - llvm.trap should be marked no return.
...
llvm-svn: 157551
2012-05-27 23:20:41 +00:00
Benjamin Kramer
27f1429717
DenseMap: Use an early exit when there is nothing to do in DestroyAll().
...
llvm-svn: 157550
2012-05-27 22:53:10 +00:00
Benjamin Kramer
ea388a2832
PR12962: Fix a rare use after free when collecting virtual overrides.
...
The DenseMap reallocates after 64 insertions so this only happened in
large test cases under very specific circumstances.
llvm-svn: 157549
2012-05-27 22:41:08 +00:00
Benjamin Kramer
152f106e5f
PR12967: Don't crash when trying to fold a shift that's larger than the type's size.
...
llvm-svn: 157548
2012-05-27 22:03:32 +00:00
Lang Hames
6ccb51130e
Fix call to APSInt constructor - it doesn't take an initial value, just a
...
bitwidth and signedness. Also rename the variable to reflect its purpose.
No test case - discovered during random code exploration.
llvm-svn: 157547
2012-05-27 21:39:49 +00:00
Benjamin Kramer
78eb6e91bd
IntrusiveRefCntPtr: Use the same pattern as the other operator= overloads when using rvalue refs.
...
llvm-svn: 157546
2012-05-27 20:46:04 +00:00
Chris Lattner
144b619684
Reimplement the intrinsic verifier to use the same table as Intrinsic::getDefinition,
...
making it stronger and more sane.
Delete the code from tblgen that produced the old code.
Besides being a path forward in intrinsic sanity, this also eliminates a bunch of
machine generated code that was compiled into Function.o
llvm-svn: 157545
2012-05-27 19:37:05 +00:00
Chris Lattner
f7f59b15aa
These tests used intrinsics with the wrong prototype. They weren't caught because
...
the old verifier just checked that something "was a pointer", but not that the pointee
was correct.
llvm-svn: 157544
2012-05-27 19:35:41 +00:00
Chris Lattner
4cca620c18
remove two (useless) tests that use incorrect intrinsic prototypes, detected by the new intrinsic verifier.
...
llvm-svn: 157543
2012-05-27 19:31:00 +00:00
Chris Lattner
9db8eed2b2
generalize this to allow any argument.
...
llvm-svn: 157542
2012-05-27 19:17:16 +00:00
Peter Collingbourne
4d358b55fa
Have getOrCreateSubprogramDIE store the DIE for a subprogram
...
definition in the map before calling itself to retrieve the
DIE for the declaration. Without this change, if this causes
getOrCreateSubprogramDIE to be recursively called on the definition,
it will create multiple DIEs for that definition. Fixes PR12831.
llvm-svn: 157541
2012-05-27 18:36:44 +00:00
Chris Lattner
f39c278384
move some code around so that Verifier.cpp can get access to the intrinsic info table.
...
llvm-svn: 157540
2012-05-27 18:28:35 +00:00
Benjamin Kramer
1e165f0343
DenseMap: Provide a move ctor and move semantics for operator[] and FindAndConstruct.
...
The only missing part is insert(), which uses a pair of parameters and I haven't
figured out how to convert it to rvalue references. It's now possible to use a
DenseMap with std::unique_ptr values :)
llvm-svn: 157539
2012-05-27 17:38:30 +00:00
Benjamin Kramer
fd91e72ee2
DenseMap: Factor destruction into a common helper method.
...
llvm-svn: 157538
2012-05-27 17:38:18 +00:00
Fariborz Jahanian
f021889036
-Wdeprecated warning to include reference (as a note)
...
to the declaration in this patch. // rdar://10893232
llvm-svn: 157537
2012-05-27 16:59:48 +00:00
Chris Lattner
c464416107
enhance the intrinsic info table to encode what *kind* of Any argument
...
it is (at the cost of 45 bytes of extra table space) so that the verifier can
start using it.
llvm-svn: 157536
2012-05-27 16:39:08 +00:00
Benjamin Kramer
15d4169e7e
Move-enable IntrusiveRefCntPtr.
...
These tend to be copied around a lot, moving it instead saves a ton of memory
accesses.
llvm-svn: 157535
2012-05-27 16:22:08 +00:00
Benjamin Kramer
443488eba9
Pass ProgramStateRef by reference.
...
Retain + Release on a ref counted pointer is cheap, but not free (it adds a function call in this case).
llvm-svn: 157534
2012-05-27 15:32:10 +00:00
Dmitri Gribenko
34983f25c6
Close HTML tag properly.
...
llvm-svn: 157533
2012-05-27 14:08:44 +00:00
Benjamin Kramer
b33ffee04f
Use the SelectorSet typedef more widely throughout Sema.
...
While there make it a SmallPtrSet.
llvm-svn: 157532
2012-05-27 13:28:52 +00:00
Benjamin Kramer
69b5a60d96
Replace some custom hash combines with the standard stuff from DenseMapInfo.
...
llvm-svn: 157531
2012-05-27 13:28:44 +00:00
NAKAMURA Takumi
42e5ac409c
clang/unittests/Tooling/RewriterTestContext.h: Don't try to remove TemporaryDirectory.
...
llvm-svn: 157530
2012-05-27 13:10:14 +00:00
NAKAMURA Takumi
b030e8a5c8
Path::GetTemporaryDirectory(): Add an assertion if TempDirectory is alive, to check when someone would remove the tempdir.
...
llvm-svn: 157529
2012-05-27 13:02:04 +00:00
NAKAMURA Takumi
ce6ad6748a
clang/lib/Rewrite/Rewriter.cpp: Don't try to rename opened files on Win32. Win32 doesn't allow rename/removing opened files.
...
llvm-svn: 157528
2012-05-27 12:59:58 +00:00
Benjamin Kramer
abb3fa69b4
Missed parens.
...
llvm-svn: 157527
2012-05-27 10:56:55 +00:00
Benjamin Kramer
4b8f8e75e6
r157525 didn't work, just disable iterator checking.
...
This is obviosly right but I don't see how to do this with proper vector
iterators without building a horrible mess of workarounds.
llvm-svn: 157526
2012-05-27 10:24:52 +00:00
Benjamin Kramer
48ff2751c1
SDAGBuilder: Avoid iterator invalidation harder.
...
vector.begin()-1 is invalid too.
llvm-svn: 157525
2012-05-27 09:44:52 +00:00
Charles Davis
5511dfb399
Mangle template instantiations properly (as of VC 7.x) when compiling for
...
the Microsoft Visual C++ ABI. Currently limited to type and integral
non-type arguments. Based on a patch by Timur Iskhodzhanov!
llvm-svn: 157524
2012-05-26 23:12:19 +00:00
Chris Lattner
c5a825bb79
rearrange some code, no functionality change.
...
llvm-svn: 157523
2012-05-26 23:03:52 +00:00
Benjamin Kramer
5aad872f8c
SDAGBuilder: Don't create an invalid iterator when there is only one switch case.
...
Found by libstdc++'s debug mode.
llvm-svn: 157522
2012-05-26 21:19:12 +00:00
Benjamin Kramer
f2beccf6b4
SelectionDAGBuilder: When emitting small compare chains for switches order them by using edge weights.
...
SimplifyCFG tends to form a lot of 2-3 case switches when merging branches. Move
the most likely condition to the front so it is checked first and the others can
be skipped. This is currently not as effective as it could be because SimplifyCFG
destroys profiling metadata when merging branches and switches. Merging branch
weight metadata is tricky though.
This code touches at most 3 cases so I didn't use a proper sorting algorithm.
llvm-svn: 157521
2012-05-26 20:01:32 +00:00
Benjamin Kramer
7b01b578a9
Only emit one set of braces for __VERSION__, getClangFullRepositoryVersion already adds some.
...
No test as the output is highly dependend on the local configuration.
llvm-svn: 157520
2012-05-26 19:39:52 +00:00
Greg Clayton
d70b14ea9d
Fixed memory management issues introduced by revision 157507.
...
A local std::string was being filled in and then the function would return "s.c_str()".
A local StreamString (which contains a std::string) was being filled in, and essentially also returning the c string from the std::string, though it was in a the StreamString class.
The fix was to not do this by passing a stream object into StringList::Join() and fix the "arch_helper()" function to do what it should: cache the result in a global.
llvm-svn: 157519
2012-05-26 17:21:14 +00:00
Duncan Sands
3c05cd3ea8
Since commit 157467, if reassociate isn't actually going to change an expression
...
then it doesn't alter the instructions composing it, however it would continue
to move the instructions to just before the expression root. Ensure it doesn't
move them either, so now it really does nothing if there is nothing to do. That
commit also ensured that nsw etc flags weren't cleared if the expression was not
being changed. Tweak this a bit so that it doesn't clear flags on the initial
part of a computation either if that part didn't change but later bits did.
llvm-svn: 157518
2012-05-26 16:42:52 +00:00
Fariborz Jahanian
f3b7681f2b
Change warning to error when property setter names conflict.
...
// rdar://11528439
llvm-svn: 157517
2012-05-26 16:10:06 +00:00
Benjamin Kramer
58abf4f193
SimplifyCFG: Turn the ad-hoc std::pair that represents switch cases into an explicit struct.
...
llvm-svn: 157516
2012-05-26 14:29:37 +00:00
Benjamin Kramer
65e75666ff
Add support for branch weight metadata to MDBuilder and use it in various places.
...
llvm-svn: 157515
2012-05-26 13:59:43 +00:00