platform/upstream/llvm.git
12 years agoSwitchInst: Due to bad readability case iterators definition was moved to the end...
Stepan Dyatkovskiy [Mon, 28 May 2012 10:11:27 +0000 (10:11 +0000)]
SwitchInst: Due to bad readability case iterators definition was moved to the end of SwitchInst.

llvm-svn: 157575

12 years agoAdd support for the GCOV_PREFIX_STRIP env variable which tries to strip off the first...
Bill Wendling [Mon, 28 May 2012 10:09:01 +0000 (10:09 +0000)]
Add support for the GCOV_PREFIX_STRIP env variable which tries to strip off the first 'n' directories from the filename.

llvm-svn: 157574

12 years agoAdd stub for 'atoi'.
Bill Wendling [Mon, 28 May 2012 09:58:27 +0000 (09:58 +0000)]
Add stub for 'atoi'.

llvm-svn: 157573

12 years agoSimplify the logic that tries to open the GCDA file at all costs. Basically, if
Bill Wendling [Mon, 28 May 2012 09:46:43 +0000 (09:46 +0000)]
Simplify the logic that tries to open the GCDA file at all costs. Basically, if
we can't open the file even after creating all of the directories to it, then
just give up.

llvm-svn: 157572

12 years ago* A bit of cleanup of the 'recursive_mkdir'. No functionality change.
Bill Wendling [Mon, 28 May 2012 09:41:48 +0000 (09:41 +0000)]
* A bit of cleanup of the 'recursive_mkdir'. No functionality change.
* Check for absolute paths before using the GCOV_PREFIX.
* Don't add an ending path separator if there's already one.

llvm-svn: 157571

12 years agotsan: increase /proc/self/maps max size (1M is far not enough)
Dmitry Vyukov [Mon, 28 May 2012 09:24:01 +0000 (09:24 +0000)]
tsan: increase /proc/self/maps max size (1M is far not enough)

llvm-svn: 157570

12 years agoasan/tsan: rename interceptors from __xsan_xxx to __interceptor_xxx
Dmitry Vyukov [Mon, 28 May 2012 07:47:35 +0000 (07:47 +0000)]
asan/tsan: rename interceptors from __xsan_xxx to __interceptor_xxx

llvm-svn: 157569

12 years agotsan: more robust detection of stack of main thread
Dmitry Vyukov [Mon, 28 May 2012 07:46:42 +0000 (07:46 +0000)]
tsan: more robust detection of stack of main thread

llvm-svn: 157568

12 years agotsan: use DCHECK_GT/LT instead of plain DCHECK (better diagnostics)
Dmitry Vyukov [Mon, 28 May 2012 07:45:35 +0000 (07:45 +0000)]
tsan: use DCHECK_GT/LT instead of plain DCHECK (better diagnostics)

llvm-svn: 157567

12 years agotsan: do not clean stack/tls for main thread
Dmitry Vyukov [Mon, 28 May 2012 07:44:34 +0000 (07:44 +0000)]
tsan: do not clean stack/tls for main thread

llvm-svn: 157566

12 years agoasan: remove static libraries on make clean
Dmitry Vyukov [Mon, 28 May 2012 07:43:36 +0000 (07:43 +0000)]
asan: remove static libraries on make clean

llvm-svn: 157565

12 years agoImplement the indirect counter increment code in a better way. Instead of
Bill Wendling [Mon, 28 May 2012 06:10:56 +0000 (06:10 +0000)]
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

12 years agoRemove all written files
Filipe Cabecinhas [Mon, 28 May 2012 04:07:56 +0000 (04:07 +0000)]
Remove all written files

llvm-svn: 157562

12 years agoFix Lang's fix. This should fix the tests for +Asserts builds.
Charles Davis [Mon, 28 May 2012 03:54:22 +0000 (03:54 +0000)]
Fix Lang's fix. This should fix the tests for +Asserts builds.

llvm-svn: 157561

12 years agoDon't use 'strrchr', which isn't implemented here yet.
Bill Wendling [Mon, 28 May 2012 02:50:53 +0000 (02:50 +0000)]
Don't use 'strrchr', which isn't implemented here yet.

llvm-svn: 157560

12 years agoSync with old GCOV runtime library's file.
Bill Wendling [Mon, 28 May 2012 02:34:34 +0000 (02:34 +0000)]
Sync with old GCOV runtime library's file.

llvm-svn: 157559

12 years agoadjust to mainline llvm API change.
Chris Lattner [Mon, 28 May 2012 01:47:53 +0000 (01:47 +0000)]
adjust to mainline llvm API change.

llvm-svn: 157557

12 years agoswitch AttrListPtr::get to take an ArrayRef, simplifying a lot of clients.
Chris Lattner [Mon, 28 May 2012 01:47:44 +0000 (01:47 +0000)]
switch AttrListPtr::get to take an ArrayRef, simplifying a lot of clients.

llvm-svn: 157556

12 years agosimplify code.
Chris Lattner [Mon, 28 May 2012 01:37:08 +0000 (01:37 +0000)]
simplify code.

llvm-svn: 157555

12 years agoadd some helper methods to make the type more uniform.
Chris Lattner [Mon, 28 May 2012 01:29:59 +0000 (01:29 +0000)]
add some helper methods to make the type more uniform.

llvm-svn: 157554

12 years agoFix PR12960 by not attempting to correct cases when we're not actually instantiatiati...
David Blaikie [Mon, 28 May 2012 01:26:45 +0000 (01:26 +0000)]
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

12 years agoTest case for 157547. Before that patch, all the digits would be mangled
Charles Davis [Mon, 28 May 2012 00:43:56 +0000 (00:43 +0000)]
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

12 years agordar://11542750 - llvm.trap should be marked no return.
Chris Lattner [Sun, 27 May 2012 23:20:41 +0000 (23:20 +0000)]
rdar://11542750 - llvm.trap should be marked no return.

llvm-svn: 157551

12 years agoDenseMap: Use an early exit when there is nothing to do in DestroyAll().
Benjamin Kramer [Sun, 27 May 2012 22:53:10 +0000 (22:53 +0000)]
DenseMap: Use an early exit when there is nothing to do in DestroyAll().

llvm-svn: 157550

12 years agoPR12962: Fix a rare use after free when collecting virtual overrides.
Benjamin Kramer [Sun, 27 May 2012 22:41:08 +0000 (22:41 +0000)]
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

12 years agoPR12967: Don't crash when trying to fold a shift that's larger than the type's size.
Benjamin Kramer [Sun, 27 May 2012 22:03:32 +0000 (22:03 +0000)]
PR12967: Don't crash when trying to fold a shift that's larger than the type's size.

llvm-svn: 157548

12 years agoFix call to APSInt constructor - it doesn't take an initial value, just a
Lang Hames [Sun, 27 May 2012 21:39:49 +0000 (21:39 +0000)]
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

12 years agoIntrusiveRefCntPtr: Use the same pattern as the other operator= overloads when using...
Benjamin Kramer [Sun, 27 May 2012 20:46:04 +0000 (20:46 +0000)]
IntrusiveRefCntPtr: Use the same pattern as the other operator= overloads when using rvalue refs.

llvm-svn: 157546

12 years agoReimplement the intrinsic verifier to use the same table as Intrinsic::getDefinition,
Chris Lattner [Sun, 27 May 2012 19:37:05 +0000 (19:37 +0000)]
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

12 years agoThese tests used intrinsics with the wrong prototype. They weren't caught because
Chris Lattner [Sun, 27 May 2012 19:35:41 +0000 (19:35 +0000)]
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

12 years agoremove two (useless) tests that use incorrect intrinsic prototypes, detected by the...
Chris Lattner [Sun, 27 May 2012 19:31:00 +0000 (19:31 +0000)]
remove two (useless) tests that use incorrect intrinsic prototypes, detected by the new intrinsic verifier.

llvm-svn: 157543

12 years agogeneralize this to allow any argument.
Chris Lattner [Sun, 27 May 2012 19:17:16 +0000 (19:17 +0000)]
generalize this to allow any argument.

llvm-svn: 157542

12 years agoHave getOrCreateSubprogramDIE store the DIE for a subprogram
Peter Collingbourne [Sun, 27 May 2012 18:36:44 +0000 (18:36 +0000)]
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

12 years agomove some code around so that Verifier.cpp can get access to the intrinsic info table.
Chris Lattner [Sun, 27 May 2012 18:28:35 +0000 (18:28 +0000)]
move some code around so that Verifier.cpp can get access to the intrinsic info table.

llvm-svn: 157540

12 years agoDenseMap: Provide a move ctor and move semantics for operator[] and FindAndConstruct.
Benjamin Kramer [Sun, 27 May 2012 17:38:30 +0000 (17:38 +0000)]
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

12 years agoDenseMap: Factor destruction into a common helper method.
Benjamin Kramer [Sun, 27 May 2012 17:38:18 +0000 (17:38 +0000)]
DenseMap: Factor destruction into a common helper method.

llvm-svn: 157538

12 years ago-Wdeprecated warning to include reference (as a note)
Fariborz Jahanian [Sun, 27 May 2012 16:59:48 +0000 (16:59 +0000)]
-Wdeprecated warning to include reference (as a note)
to the declaration in this patch. // rdar://10893232

llvm-svn: 157537

12 years agoenhance the intrinsic info table to encode what *kind* of Any argument
Chris Lattner [Sun, 27 May 2012 16:39:08 +0000 (16:39 +0000)]
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

12 years agoMove-enable IntrusiveRefCntPtr.
Benjamin Kramer [Sun, 27 May 2012 16:22:08 +0000 (16:22 +0000)]
Move-enable IntrusiveRefCntPtr.

These tend to be copied around a lot, moving it instead saves a ton of memory
accesses.

llvm-svn: 157535

12 years agoPass ProgramStateRef by reference.
Benjamin Kramer [Sun, 27 May 2012 15:32:10 +0000 (15:32 +0000)]
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

12 years agoClose HTML tag properly.
Dmitri Gribenko [Sun, 27 May 2012 14:08:44 +0000 (14:08 +0000)]
Close HTML tag properly.

llvm-svn: 157533

12 years agoUse the SelectorSet typedef more widely throughout Sema.
Benjamin Kramer [Sun, 27 May 2012 13:28:52 +0000 (13:28 +0000)]
Use the SelectorSet typedef more widely throughout Sema.

While there make it a SmallPtrSet.

llvm-svn: 157532

12 years agoReplace some custom hash combines with the standard stuff from DenseMapInfo.
Benjamin Kramer [Sun, 27 May 2012 13:28:44 +0000 (13:28 +0000)]
Replace some custom hash combines with the standard stuff from DenseMapInfo.

llvm-svn: 157531

12 years agoclang/unittests/Tooling/RewriterTestContext.h: Don't try to remove TemporaryDirectory.
NAKAMURA Takumi [Sun, 27 May 2012 13:10:14 +0000 (13:10 +0000)]
clang/unittests/Tooling/RewriterTestContext.h: Don't try to remove TemporaryDirectory.

llvm-svn: 157530

12 years agoPath::GetTemporaryDirectory(): Add an assertion if TempDirectory is alive, to check...
NAKAMURA Takumi [Sun, 27 May 2012 13:02:04 +0000 (13:02 +0000)]
Path::GetTemporaryDirectory(): Add an assertion if TempDirectory is alive, to check when someone would remove the tempdir.

llvm-svn: 157529

12 years agoclang/lib/Rewrite/Rewriter.cpp: Don't try to rename opened files on Win32. Win32...
NAKAMURA Takumi [Sun, 27 May 2012 12:59:58 +0000 (12:59 +0000)]
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

12 years agoMissed parens.
Benjamin Kramer [Sun, 27 May 2012 10:56:55 +0000 (10:56 +0000)]
Missed parens.

llvm-svn: 157527

12 years agor157525 didn't work, just disable iterator checking.
Benjamin Kramer [Sun, 27 May 2012 10:24:52 +0000 (10:24 +0000)]
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

12 years agoSDAGBuilder: Avoid iterator invalidation harder.
Benjamin Kramer [Sun, 27 May 2012 09:44:52 +0000 (09:44 +0000)]
SDAGBuilder: Avoid iterator invalidation harder.

vector.begin()-1 is invalid too.

llvm-svn: 157525

12 years agoMangle template instantiations properly (as of VC 7.x) when compiling for
Charles Davis [Sat, 26 May 2012 23:12:19 +0000 (23:12 +0000)]
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

12 years agorearrange some code, no functionality change.
Chris Lattner [Sat, 26 May 2012 23:03:52 +0000 (23:03 +0000)]
rearrange some code, no functionality change.

llvm-svn: 157523

12 years agoSDAGBuilder: Don't create an invalid iterator when there is only one switch case.
Benjamin Kramer [Sat, 26 May 2012 21:19:12 +0000 (21:19 +0000)]
SDAGBuilder: Don't create an invalid iterator when there is only one switch case.

Found by libstdc++'s debug mode.

llvm-svn: 157522

12 years agoSelectionDAGBuilder: When emitting small compare chains for switches order them by...
Benjamin Kramer [Sat, 26 May 2012 20:01:32 +0000 (20:01 +0000)]
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

12 years agoOnly emit one set of braces for __VERSION__, getClangFullRepositoryVersion already...
Benjamin Kramer [Sat, 26 May 2012 19:39:52 +0000 (19:39 +0000)]
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

12 years agoFixed memory management issues introduced by revision 157507.
Greg Clayton [Sat, 26 May 2012 17:21:14 +0000 (17:21 +0000)]
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

12 years agoSince commit 157467, if reassociate isn't actually going to change an expression
Duncan Sands [Sat, 26 May 2012 16:42:52 +0000 (16:42 +0000)]
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

12 years agoChange warning to error when property setter names conflict.
Fariborz Jahanian [Sat, 26 May 2012 16:10:06 +0000 (16:10 +0000)]
Change warning to error when property setter names conflict.
// rdar://11528439

llvm-svn: 157517

12 years agoSimplifyCFG: Turn the ad-hoc std::pair that represents switch cases into an explicit...
Benjamin Kramer [Sat, 26 May 2012 14:29:37 +0000 (14:29 +0000)]
SimplifyCFG: Turn the ad-hoc std::pair that represents switch cases into an explicit struct.

llvm-svn: 157516

12 years agoAdd support for branch weight metadata to MDBuilder and use it in various places.
Benjamin Kramer [Sat, 26 May 2012 13:59:43 +0000 (13:59 +0000)]
Add support for branch weight metadata to MDBuilder and use it in various places.

llvm-svn: 157515

12 years agoScoreboardHazardRecognizer: Remove dead conditional in debug code.
Benjamin Kramer [Sat, 26 May 2012 11:37:37 +0000 (11:37 +0000)]
ScoreboardHazardRecognizer: Remove dead conditional in debug code.

Negative cycles are filtered out earlier.

llvm-svn: 157514

12 years agoMove this debug statement earlier so it is easy to see the order in
Duncan Sands [Sat, 26 May 2012 07:47:48 +0000 (07:47 +0000)]
Move this debug statement earlier so it is easy to see the order in
which operands come flying out of the linearization stage.

llvm-svn: 157512

12 years agoIn response to some discussions on IRC, tweak the wording of the new
Richard Smith [Sat, 26 May 2012 06:20:46 +0000 (06:20 +0000)]
In response to some discussions on IRC, tweak the wording of the new
-Wsometimes-uninitialized diagnostics to make it clearer that the cause
of the issue may be a condition which must always evaluate to true or
false, rather than an uninitialized variable.

To emphasize this, add a new note with a fixit which removes the
impossible condition or replaces it with a constant.

Also, downgrade the diagnostic from -Wsometimes-uninitialized to
-Wconditional-uninitialized when it applies to a range-based for loop,
since the condition is not written explicitly in the code in that case.

llvm-svn: 157511

12 years agoFix indentation.
David Blaikie [Sat, 26 May 2012 05:35:39 +0000 (05:35 +0000)]
Fix indentation.

llvm-svn: 157510

12 years agoDon't offer '[[clang::fallthrough]];' fix-it when a fall-through occurs to a
Alexander Kornienko [Sat, 26 May 2012 00:49:15 +0000 (00:49 +0000)]
Don't offer '[[clang::fallthrough]];' fix-it when a fall-through occurs to a
switch label immediately followed by a 'break;'.

llvm-svn: 157508

12 years agordar://problem/11535045
Johnny Chen [Sat, 26 May 2012 00:32:39 +0000 (00:32 +0000)]
rdar://problem/11535045

Make 'help arch' return the list of supported architectures.
Add a convenience method StringList::Join(const char *separator) which is called from the help function for 'arch'.
Also add a simple test case.

llvm-svn: 157507

12 years agoFix the comments about LLDB_DISABLE_PYTHON in the python swig shell scripts to be...
Jim Ingham [Sat, 26 May 2012 00:23:52 +0000 (00:23 +0000)]
Fix the comments about LLDB_DISABLE_PYTHON in the python swig shell scripts to be more clear.

llvm-svn: 157506

12 years agoThe llvm_gcda_increment_indirect_counter function writes to the arguments that
Bill Wendling [Fri, 25 May 2012 23:55:00 +0000 (23:55 +0000)]
The llvm_gcda_increment_indirect_counter function writes to the arguments that
are passed in. However, those arguments may be in a write-protected area, as far
as the runtime library is concerned. For instance, the data could be placed into
a 'linkedit' section, which isn't writable. Emit the code from
llvm_gcda_increment_indirect_counter directly into the function instead.

Note: The code for this is ugly, and can lead to bloat. We should look into
simplifying this code instead of having all of these branches.

<rdar://problem/11181370>

llvm-svn: 157505

12 years agoFix predicate HasStandardEncoding in MipsInstrInfo.td per suggestion of
Akira Hatanaka [Fri, 25 May 2012 22:15:15 +0000 (22:15 +0000)]
Fix predicate HasStandardEncoding in MipsInstrInfo.td per suggestion of
Benjamin Kramer.

llvm-svn: 157504

12 years agoThe rules for emplace in map, multimap, unordered_map and unordered_multimap changed...
Howard Hinnant [Fri, 25 May 2012 22:04:21 +0000 (22:04 +0000)]
The rules for emplace in map, multimap, unordered_map and unordered_multimap changed a while back and I'm just now updating to these new rules.  In a nutshell, you've got to know you're emplacing to a pair and use one of pair's constructors.  I made one extension:  If you want to emplace the key and default construct the mapped_type, you can just emplace(key), as opposed to emplace(piecewise_construct, forward_as_tuple(key), forward_as_tuple()).

llvm-svn: 157503

12 years agoSmall code cleanup. No functionality change.
Bill Wendling [Fri, 25 May 2012 21:57:59 +0000 (21:57 +0000)]
Small code cleanup. No functionality change.

llvm-svn: 157502

12 years agoOpen in read/write mode, creating the file if it doesn't exist.
Bill Wendling [Fri, 25 May 2012 21:55:06 +0000 (21:55 +0000)]
Open in read/write mode, creating the file if it doesn't exist.

llvm-svn: 157501

12 years agofix codegen support for alloc_size attribute for static C++ methods
Nuno Lopes [Fri, 25 May 2012 21:45:08 +0000 (21:45 +0000)]
fix codegen support for alloc_size attribute for static C++ methods
add test case for C++ codegen

llvm-svn: 157500

12 years agobounds checking: add support for byval arguments
Nuno Lopes [Fri, 25 May 2012 21:15:17 +0000 (21:15 +0000)]
bounds checking: add support for byval arguments

llvm-svn: 157498

12 years agordar://problem/11533713
Johnny Chen [Fri, 25 May 2012 21:10:46 +0000 (21:10 +0000)]
rdar://problem/11533713

Allow setting conditions inline with breakpoints.  Add test cases.

llvm-svn: 157497

12 years agoDelete MipsExpandPseudo.cpp.
Akira Hatanaka [Fri, 25 May 2012 20:54:48 +0000 (20:54 +0000)]
Delete MipsExpandPseudo.cpp.

llvm-svn: 157496

12 years agoMove the code in MipsExpandPseudo to MipsInstrInfo::expandPostRAPseudo.
Akira Hatanaka [Fri, 25 May 2012 20:52:52 +0000 (20:52 +0000)]
Move the code in MipsExpandPseudo to MipsInstrInfo::expandPostRAPseudo.
Delete MipsExpandPseudo.

llvm-svn: 157495

12 years agoRemove the code that expands MIPS' .cpload directive.
Akira Hatanaka [Fri, 25 May 2012 20:46:52 +0000 (20:46 +0000)]
Remove the code that expands MIPS' .cpload directive.

llvm-svn: 157494

12 years agoRemove the code that emits MIPS' .cprestore directive.
Akira Hatanaka [Fri, 25 May 2012 20:42:55 +0000 (20:42 +0000)]
Remove the code that emits MIPS' .cprestore directive.

llvm-svn: 157493

12 years agoRemove pseudo instructions that are no longer used.
Akira Hatanaka [Fri, 25 May 2012 20:37:40 +0000 (20:37 +0000)]
Remove pseudo instructions that are no longer used.

llvm-svn: 157492

12 years ago[libclang] Add a test I forgot to commit for r156890.
Argyrios Kyrtzidis [Fri, 25 May 2012 20:05:57 +0000 (20:05 +0000)]
[libclang] Add a test I forgot to commit for r156890.

llvm-svn: 157491

12 years agoFixed a crash in logging when the name of an
Sean Callanan [Fri, 25 May 2012 18:12:26 +0000 (18:12 +0000)]
Fixed a crash in logging when the name of an
entity imported by the ASTImporter had a NamedDecl
with a name that wasn't a plain string (e.g., a
selector).

llvm-svn: 157488

12 years ago<rdar://problem/11535465>
Greg Clayton [Fri, 25 May 2012 18:09:55 +0000 (18:09 +0000)]
<rdar://problem/11535465>

LC_ENCRYPTION_INFO with "cryptid == 0" is not actually encrypted and LLDB fails to read memory from file.

llvm-svn: 157487

12 years agoDon't ignore linkage when ignoring visibility in the instantiation of a
Rafael Espindola [Fri, 25 May 2012 17:22:33 +0000 (17:22 +0000)]
Don't ignore linkage when ignoring visibility in the instantiation of a
method template.

llvm-svn: 157486

12 years ago[NVPTX] Add a new test case for the newly-enabled call handling
Justin Holewinski [Fri, 25 May 2012 17:20:38 +0000 (17:20 +0000)]
[NVPTX] Add a new test case for the newly-enabled call handling

NV_CONTRIB

llvm-svn: 157485

12 years ago<rdar://problem/11534686>
Greg Clayton [Fri, 25 May 2012 17:05:55 +0000 (17:05 +0000)]
<rdar://problem/11534686>

Reading memory from a file when the section is encrypted doesn't show an error. No we do.

llvm-svn: 157484

12 years agoadd CodeGen support for the alloc_size attribute
Nuno Lopes [Fri, 25 May 2012 17:04:42 +0000 (17:04 +0000)]
add CodeGen support for the alloc_size attribute

llvm-svn: 157483

12 years agoFixed an issue where we might have easy access to the string table data for a mach...
Greg Clayton [Fri, 25 May 2012 17:04:00 +0000 (17:04 +0000)]
Fixed an issue where we might have easy access to the string table data for a mach file from memory even though we have a process. So now we don't read the string table strings from memory when we don't have to.

llvm-svn: 157482

12 years agoboundschecking:
Nuno Lopes [Fri, 25 May 2012 16:54:04 +0000 (16:54 +0000)]
boundschecking:
add support for select
add experimental support for alloc_size metadata

llvm-svn: 157481

12 years agoDon't ignore linkage when ignoring visibility in the instantiation of a
Rafael Espindola [Fri, 25 May 2012 16:41:35 +0000 (16:41 +0000)]
Don't ignore linkage when ignoring visibility in the instantiation of a
function template.

llvm-svn: 157480

12 years agoChange interface for TargetLowering::LowerCallTo and TargetLowering::LowerCall
Justin Holewinski [Fri, 25 May 2012 16:35:28 +0000 (16:35 +0000)]
Change interface for TargetLowering::LowerCallTo and TargetLowering::LowerCall
to pass around a struct instead of a large set of individual values.  This
cleans up the interface and allows more information to be added to the struct
for future targets without requiring changes to each and every target.

NV_CONTRIB

llvm-svn: 157479

12 years ago[analyzer] Don't crash on LValBitCast
Anna Zaks [Fri, 25 May 2012 16:02:16 +0000 (16:02 +0000)]
[analyzer] Don't crash on LValBitCast

llvm-svn: 157478

12 years agoTypo fix.
Alexander Potapenko [Fri, 25 May 2012 15:56:40 +0000 (15:56 +0000)]
Typo fix.

llvm-svn: 157477

12 years agoFix memory corruption bug found and fixed by Andrew C. Morrow.
Howard Hinnant [Fri, 25 May 2012 15:55:46 +0000 (15:55 +0000)]
Fix memory corruption bug found and fixed by Andrew C. Morrow.

llvm-svn: 157476

12 years agoConsider the linkage for member class templates even when we have to ignore
Rafael Espindola [Fri, 25 May 2012 15:51:26 +0000 (15:51 +0000)]
Consider the linkage for member class templates even when we have to ignore
the visibility.

llvm-svn: 157475

12 years agotest/CodeGen/X86/bigstructret.ll: Suppress one test. It is msvc-incompatible. (compat...
NAKAMURA Takumi [Fri, 25 May 2012 15:40:54 +0000 (15:40 +0000)]
test/CodeGen/X86/bigstructret.ll: Suppress one test. It is msvc-incompatible. (compatible to mingw32 and netbsd, though)

llvm-svn: 157474

12 years agoFactor ParseAsanOptions outside __asan_init
Alexander Potapenko [Fri, 25 May 2012 15:37:16 +0000 (15:37 +0000)]
Factor ParseAsanOptions outside __asan_init

llvm-svn: 157473

12 years agoIntroduce the check_malloc_usable_size flag (on by default).
Alexander Potapenko [Fri, 25 May 2012 15:20:13 +0000 (15:20 +0000)]
Introduce the check_malloc_usable_size flag (on by default).
When the flag is set to zero, we do not check for errors in malloc_usable_size.
This may be useful to work around a bug in Nvidia drivers prior to 295.*

llvm-svn: 157472

12 years agotest/CodeGen/X86/bigstructret.ll: Relax stack offsets for hosts of stack-align=8...
NAKAMURA Takumi [Fri, 25 May 2012 15:12:21 +0000 (15:12 +0000)]
test/CodeGen/X86/bigstructret.ll: Relax stack offsets for hosts of stack-align=8, eg. win32 and netbsd.

llvm-svn: 157471

12 years agoWhen ignoring visibility in an instantiation, still consider the linkage.
Rafael Espindola [Fri, 25 May 2012 14:47:05 +0000 (14:47 +0000)]
When ignoring visibility in an instantiation, still consider the linkage.
Similar fixes for function and member template to follow as I write the
testcases.

llvm-svn: 157470

12 years agoWhitespace fixes.
Rafael Espindola [Fri, 25 May 2012 14:17:45 +0000 (14:17 +0000)]
Whitespace fixes.

llvm-svn: 157469