Commit Graph

106474 Commits

Author SHA1 Message Date
Manuel Klimek 0cfc6a045c This patch implements an AST matching framework that allows to write
tools that match on the C++ ASTs. The main interface is in ASTMatchers.h,
an example implementation of a tool that removes redundant .c_str() calls
is in the example RemoveCStrCalls.cpp.

Various contributions:
Zhanyong Wan, Chandler Carruth, Marcin Kowalczyk, Wei Xu, James Dennett.

llvm-svn: 132374
2011-05-31 23:49:32 +00:00
Devang Patel 1cb8ab456c Refactor.
llvm-svn: 132373
2011-05-31 23:30:30 +00:00
Johnny Chen 4533dada39 Fix out-dated module docstring for lldbtest.py. Also wrap some lldb attribute references
inside a try-except block in case the test is not invoked through the dotest.py test driver.

llvm-svn: 132372
2011-05-31 23:21:42 +00:00
Devang Patel e9853f25ad Include global types, that are referenced through local variables, in debug_pubtypes list.
llvm-svn: 132371
2011-05-31 22:56:51 +00:00
Devang Patel 72140d553a Fix test, check for stable strings in the output.
llvm-svn: 132370
2011-05-31 22:37:03 +00:00
Francois Pichet a9f436b064 Revert 132332 (Microsoft friend as a forward declaration), John McCall pointed out a better/simpler way to do it.
llvm-svn: 132369
2011-05-31 22:36:05 +00:00
Devang Patel 5c71c2154b Robustify objc method type description (subroutine type) by walking parameters directly.
llvm-svn: 132368
2011-05-31 22:21:11 +00:00
Johnny Chen aacf92ebb4 Move some comments to the docstrings.
llvm-svn: 132367
2011-05-31 22:16:51 +00:00
Jakob Stoklund Olesen c474f1e683 Ignore Vim swap files
llvm-svn: 132365
2011-05-31 21:54:28 +00:00
Galina Kistanova e21d849476 Reverted r132135 per Xerxes request. These tests are passing for his setup. Requires more research.
llvm-svn: 132364
2011-05-31 21:50:33 +00:00
Howard Hinnant 542b2507de I've seen this question enough times to know that it should be fixed: http://stackoverflow.com/questions/6193734/implicit-conversions-with-stdfunction
llvm-svn: 132363
2011-05-31 21:45:26 +00:00
Devang Patel 7ce99c3637 List objective-c ineterfaces as public types in dwarf debug info output.
llvm-svn: 132361
2011-05-31 21:18:50 +00:00
Andrew Trick 812276eed4 scev: Better sign-extend removal. Normalize postincrement recurrences
so that their sign extended forms are congruent when no overflow occurs.

llvm-svn: 132360
2011-05-31 21:17:47 +00:00
Howard Hinnant 8f0cd597f1 noexcept for <array>.
llvm-svn: 132359
2011-05-31 21:06:33 +00:00
Jakob Stoklund Olesen 73e18b7aea Simplify the eviction policy by making the failsafe explicit.
When assigned ranges are evicted, they are put in the RS_Evicted stage and are
not allowed to evict anything else. That prevents looping automatically.

When evicting ranges just to get a cheaper register, use only spill weights to
find the possible candidates. Avoid breaking hints for this purpose, it is not
worth it.

Start implementing more complex eviction heuristics, guarded by the temporary
-complex-eviction flag. The initial version permits a heavier range to be
evicted if it doesn't have any uses where the evicting range is live. This makes
it a good candidate for live ranfge splitting.

llvm-svn: 132358
2011-05-31 21:02:44 +00:00
Devang Patel 2780e4545a List c++ class type as public type in dwarf debug info output.
llvm-svn: 132357
2011-05-31 20:46:46 +00:00
Eli Friedman 7a5fc693f9 llvm.memcpy.* has two distinct associated address spaces; the source address space, and the destination address space. Fix up the interface on MemIntrinsic and MemTransferInst to make this clear, and fix InstructionDereferencesPointer in LazyValueInfo.cpp to use the interface properly.
llvm-svn: 132356
2011-05-31 20:40:16 +00:00
Bruno Cardoso Lopes f771a0f490 Fix uninitialized variables and silence warnings
llvm-svn: 132355
2011-05-31 20:25:26 +00:00
Greg Clayton 5ad639415f Fix dynamic value objects to do the right thing when the
value fails to evaluate.

llvm-svn: 132354
2011-05-31 20:18:39 +00:00
Eli Friedman af5a89587e Add a minor missing -verify check. Found by inspection.
llvm-svn: 132353
2011-05-31 20:12:07 +00:00
Nick Lewycky 42bdfc0708 Also remove -lLTO which should have been in r132349. I failed to apply this
from David Meyer's patch!

llvm-svn: 132352
2011-05-31 20:00:45 +00:00
Stuart Hastings 9d6a06d536 Revert to pacify a buildbot. rdar://problem/6501862
llvm-svn: 132351
2011-05-31 19:56:35 +00:00
Alexis Hunt 414e3e3c2d Ensure we enter an unevaluated context when instantiating a noexcept
expression. Fixes bug raised by hhinnant to cfe-dev

llvm-svn: 132350
2011-05-31 19:54:49 +00:00
Nick Lewycky a0484fcef1 Make the gold plugin build on Cygwin as well as Linux. Patch by David Meyer!
llvm-svn: 132349
2011-05-31 19:53:26 +00:00
Stuart Hastings 780f723309 Followup to 132316; accept arbitrary constants, add with a constant,
sub with a non-constant.  Fix comments, enlarge test case.
rdar://problem/6501862

llvm-svn: 132348
2011-05-31 19:29:55 +00:00
Devang Patel 1d81ea81cd Fix html formatting.
llvm-svn: 132345
2011-05-31 18:06:14 +00:00
Devang Patel 5c26a85d1d Clarify documentation and remove guarantees that are not fulfilled.
llvm-svn: 132344
2011-05-31 17:45:27 +00:00
Howard Hinnant e3c6708439 Upgrade <ratio> to use template aliases when available.
llvm-svn: 132342
2011-05-31 16:55:36 +00:00
Richard Osborne 4dae7379ef Fix 80 column violations.
llvm-svn: 132341
2011-05-31 16:30:33 +00:00
Richard Osborne 2f14b0bb1d Add XCore intrinsic for crc8.
llvm-svn: 132340
2011-05-31 16:24:49 +00:00
Daniel Dunbar 116b305d31 Driver/Clang: Simplify code to use arch enumerations.
llvm-svn: 132338
2011-05-31 15:58:55 +00:00
Howard Hinnant b5d866d4a3 noexcept for Chapter 22 [localization].
llvm-svn: 132337
2011-05-31 15:34:58 +00:00
Richard Osborne 542f9a2bcf Add XCore intrinsic for crc32.
llvm-svn: 132336
2011-05-31 14:47:36 +00:00
Richard Osborne 36d027f7f6 Convert test to FileCheck.
llvm-svn: 132335
2011-05-31 14:00:05 +00:00
Howard Hinnant f5c91471a4 Add _ATTRIBUTE macro for gcc: Justin Hibbits
llvm-svn: 132334
2011-05-31 13:13:49 +00:00
Francois Pichet bcaf0816a5 Recreate the DeclContext before adding the implicit friend forward declaration. This should fix the asserting buildbot.
llvm-svn: 132333
2011-05-31 12:44:46 +00:00
Francois Pichet 3fd47df366 For compatibility with MSVC, a friend declaration also act as a forward declaration if the tag name is not already declared. The tag name is declared in the next outermost non record scope.
Example:

class A {
  friend class B;
  B* b;
};
B* global_b;

llvm-svn: 132332
2011-05-31 11:44:00 +00:00
Nick Lewycky 67c4d0f336 Whenever we instantiate a static data member, make sure to define any new
vtables! Fixes PR10020

This also allows us to revert the part of r130023 which added a big loop around
the template instantiation.

llvm-svn: 132331
2011-05-31 07:58:42 +00:00
Galina Kistanova 920f852759 Now with the right line endings.
llvm-svn: 132330
2011-05-31 07:19:08 +00:00
Zhongxing Xu e6a2028fe1 Fix linking of clang-wpa.
llvm-svn: 132329
2011-05-31 07:13:36 +00:00
Chandler Carruth e54ff6cc3e Expand the coverage of the warning for constants on the RHS of logical operands:
return f() || -1;

where the user meant to write '|'.

This bootstraps without any additional warnings.

Patch by Richard Trieu.

llvm-svn: 132327
2011-05-31 05:41:42 +00:00
Argyrios Kyrtzidis b3483b3d91 Utilize PackedVector, introduced with llvm commit r132325.
llvm-svn: 132326
2011-05-31 03:56:09 +00:00
Argyrios Kyrtzidis 30c532e0b0 Introduce PackedVector, useful for storing a vector of values using a specific number of bits for each
value. Both signed and unsigned types can be used, e.g

   PackedVector<signed, 2> vec;

will create a vector accepting values -2, -1, 0, 1. Any other value will hit an assertion.

llvm-svn: 132325
2011-05-31 03:53:41 +00:00
Bruno Cardoso Lopes 394f516d16 Fix ssat and ssat16 encodings for ARM and Thumb. The bit position value
must be encoded decremented by one. Only add encoding tests for ssat16
because ssat can't be parsed yet.

llvm-svn: 132324
2011-05-31 03:33:27 +00:00
Bruno Cardoso Lopes 98fc4c8bbc This patch implements atomic intrinsics atomic.load.add (sub,and,or,xor,
nand), atomic.swap and atomic.cmp.swap, all in i8, i16 and i32 versions.
The intrinsics are implemented by creating pseudo-instructions, which are
then expanded in the method MipsTargetLowering::EmitInstrWithCustomInserter.

Patch by Sasa Stankovic.

llvm-svn: 132323
2011-05-31 02:54:07 +00:00
Bruno Cardoso Lopes bf3c1251e0 This patch implements the thread local storage. Implemented are General
Dynamic, Initial Exec and Local Exec TLS models.

Patch by Sasa Stankovic

llvm-svn: 132322
2011-05-31 02:53:58 +00:00
Galina Kistanova 4503e20ae6 Just one for now to see how it will fly.
llvm-svn: 132321
2011-05-31 00:34:37 +00:00
Galina Kistanova e5ea7eb007 For X86 specific tests.
llvm-svn: 132320
2011-05-31 00:32:43 +00:00
Galina Kistanova ded0b598b6 Preparations for separating target-specific clang tests.
llvm-svn: 132319
2011-05-31 00:29:49 +00:00
Rafael Espindola 08600bcf65 Use the dwarf->llvm mapping to print register names in the cfi
directives.

Fixes PR9826.

llvm-svn: 132317
2011-05-30 20:20:15 +00:00