Commit Graph

85593 Commits

Author SHA1 Message Date
Douglas Gregor a46d66122f When we ask for the enumerators of an EnumDecl, make sure we get them even if we have a EnumDecl that is not the definition of the enumeration
llvm-svn: 106541
2010-06-22 14:45:56 +00:00
Douglas Gregor c9ea2d5a67 In C++, allow a declaration of an enum to follow a definition of that
enum as a GNU extension.

llvm-svn: 106540
2010-06-22 14:26:35 +00:00
Dan Gohman 5666ad7381 Add a comment explaining a non-obvious API.
llvm-svn: 106539
2010-06-22 13:57:08 +00:00
Dan Gohman 2ceaa71bdb Add an explicit keyword.
llvm-svn: 106538
2010-06-22 13:53:29 +00:00
Dan Gohman f820bd327d Allow "exhaustive" trip count evaluation on phi nodes with all
constant operands.

llvm-svn: 106537
2010-06-22 13:15:46 +00:00
Argyrios Kyrtzidis 75000b6814 Fix PR7180.
For

void f( a:🅱️:c );

we would cache the tokens "a:🅱️:" but then we would try to annotate them using the range "a::".
Before annotating them with the (invalid) C++ scope spec, set it to the range of "a:🅱️:".

llvm-svn: 106536
2010-06-22 11:30:04 +00:00
Benjamin Kramer 104819c6eb Move trivial parts of UserID into the header.
llvm-svn: 106535
2010-06-22 10:44:12 +00:00
Argyrios Kyrtzidis 69da4a8f07 Support emitting/reading function templates to/from PCH.
llvm-svn: 106534
2010-06-22 09:55:07 +00:00
Argyrios Kyrtzidis ae85e2414c -Introduce PCHReader::ReadTemplateArgumentLoc()
-Introduce PCHWriter::AddTemplateArgumentLocInfo()
-Modify PCHWriter::AddTemplateArgumentLoc() to also write TemplateArgumentLoc's TemplateArgument
  and move the existing calls of AddTemplateArgumentLoc() to AddTemplateArgumentLocInfo().

llvm-svn: 106533
2010-06-22 09:54:59 +00:00
Argyrios Kyrtzidis cb6f346873 Make it easier to read/write the template part of FunctionDecl.
Introduce:
-FunctionDecl::getTemplatedKind() which returns an enum signifying what kind of templated
  FunctionDecl it is.
-An overload of FunctionDecl::setFunctionTemplateSpecialization() which accepts arrays of
  TemplateArguments and TemplateArgumentLocs
-A constructor to TemplateArgumentList which accepts an array of TemplateArguments.

llvm-svn: 106532
2010-06-22 09:54:51 +00:00
Benjamin Kramer 1e63c74f60 Silence warning about C++-style comments.
llvm-svn: 106531
2010-06-22 09:29:44 +00:00
Zhongxing Xu 4505747979 Add a bunch of stream APIs to SteamChecker.
llvm-svn: 106530
2010-06-22 07:50:21 +00:00
Devang Patel f040dec68a Revert 106528. It is causing self host failures.
llvm-svn: 106529
2010-06-22 06:14:09 +00:00
Devang Patel b195eb4acf Do not rely on DenseMap slot which can be easily invalidated when DenseMap grows.
llvm-svn: 106528
2010-06-22 05:16:56 +00:00
Douglas Gregor ef4a2a2b54 Apply array-to-pointer decay when instantiating a MemberExpr. Fixes
PR7405, patch by Kyle Lippincott!

llvm-svn: 106523
2010-06-22 02:41:05 +00:00
Douglas Gregor de049cdbe6 Attempt to fix test
llvm-svn: 106522
2010-06-22 02:17:07 +00:00
Bob Wilson 6c1fc79cab Revert my change to clone named metadata. Buildbots are complaining.
--- Reverse-merging r106508 into '.':
U    lib/Transforms/Utils/CloneModule.cpp

llvm-svn: 106521
2010-06-22 02:08:51 +00:00
Dan Gohman 2370e2fe0f When unfolding a load, avoid assuming which instruction that
kill and dead flags will end up on.

llvm-svn: 106520
2010-06-22 02:07:21 +00:00
Devang Patel b6e058da18 Use single interface, using twine, to get named metadata.
getNamedMetadata().

llvm-svn: 106518
2010-06-22 01:19:38 +00:00
Evan Cheng 37bb617f8a Tail merging pass shall not break up IT blocks. rdar://8115404
llvm-svn: 106517
2010-06-22 01:18:16 +00:00
Devang Patel cbc6fd8493 Discard special LLVM prefix from linkage name.
llvm-svn: 106516
2010-06-22 01:06:05 +00:00
Devang Patel ad51735794 Do not rely on Twine temporaries to survive.
llvm-svn: 106515
2010-06-22 01:01:58 +00:00
Chris Lattner 60bb7c42a7 make sure to initialize indent_level
llvm-svn: 106513
2010-06-22 00:40:26 +00:00
Dan Gohman 851e478e6b Fix the new load-unfolding code to update LiveVariable's dead flags,
in addition to the kill flags.

llvm-svn: 106512
2010-06-22 00:32:04 +00:00
Fariborz Jahanian 469b200321 Per Chris's comment, remove another static (this one
is a static comparator operator).

llvm-svn: 106511
2010-06-22 00:23:08 +00:00
Johnny Chen 7c3f7fee41 Left a debug statement in the previous checkin.
llvm-svn: 106510
2010-06-22 00:13:20 +00:00
Johnny Chen a02199f5e7 Remove stale reference to the lldb path component.
llvm-svn: 106509
2010-06-22 00:11:26 +00:00
Bob Wilson 5f9575c1cd Include named metadata when cloning a module.
llvm-svn: 106508
2010-06-22 00:11:03 +00:00
Chris Lattner 3c77a355e0 implement support for -finstrument-functions, patch by Nelson
Elhage!

llvm-svn: 106507
2010-06-22 00:03:40 +00:00
Eric Christopher b2c4a99d52 Fix typo.
llvm-svn: 106505
2010-06-21 23:49:08 +00:00
Douglas Gregor 27b98eae80 Alter the internal representation of the condition variable in
if/while/switch/for statements to ensure that walking the children of
these statements actually works. Previously, we stored the condition
variable as a VarDecl. However, StmtIterator isn't able to walk from a
VarDecl to a set of statements, and would (in some circumstances) walk
beyond the end of the list of statements, cause Bad Behavior.

In this change, we've gone back to representing the condition
variables as DeclStmts. While not as memory-efficient as VarDecls, it
greatly simplifies iteration over the children. 

Fixes the remainder of <rdar://problem/8104754>.

llvm-svn: 106504
2010-06-21 23:44:13 +00:00
Fariborz Jahanian c9fec975e6 Avoid using a local static for providing lexical
order of priorotized global object initializations.

llvm-svn: 106503
2010-06-21 23:31:29 +00:00
Chris Lattner 64960f55fe add some support for blockaddress. This isn't really enough to be useful,
but it will cover uses of blockaddress that are actually in a function.

llvm-svn: 106502
2010-06-21 23:19:36 +00:00
Chris Lattner bb45b964f8 eliminate a mutable global variable, use raw_ostream::indent instead of
rolling our own.

llvm-svn: 106501
2010-06-21 23:14:47 +00:00
Chris Lattner a0b8c90870 un-indent a huge amount of code out of an anonymous namespace.
llvm-svn: 106500
2010-06-21 23:12:56 +00:00
Bruno Cardoso Lopes b7dadb0e95 revert r106482
llvm-svn: 106499
2010-06-21 22:59:03 +00:00
Chris Lattner 26d7950f8f fix several bugs in the tutorial, patch by Kevin Kelley!
llvm-svn: 106498
2010-06-21 22:51:14 +00:00
Douglas Gregor 143d367ecf Zero out a stale pointer
llvm-svn: 106497
2010-06-21 22:46:46 +00:00
Douglas Gregor 9377c8230b When semantic analysis fail to introduce a class or class template,
just skip over the body of the class or class template: it's a
semantic disaster that's likely to cause invariants to break. Fixes
part of <rdar://problem/8104754>.

llvm-svn: 106496
2010-06-21 22:31:09 +00:00
Ted Kremenek e4e9941ae7 Update checker build.
llvm-svn: 106495
2010-06-21 22:25:24 +00:00
Fariborz Jahanian 2990e3a502 Test case for PR7431 by Nico Weber.
llvm-svn: 106494
2010-06-21 22:21:57 +00:00
Dan Gohman 3c1b3c61e9 Teach two-address lowering how to unfold a load to open up commuting
opportunities. For example, this lets it emit this:

   movq (%rax), %rcx
   addq %rdx, %rcx

instead of this:

   movq %rdx, %rcx
   addq (%rax), %rcx

in the case where %rdx has subsequent uses. It's the same number
of instructions, and usually the same encoding size on x86, but
it appears faster, and in general, it may allow better scheduling
for the load.

llvm-svn: 106493
2010-06-21 22:17:20 +00:00
Fariborz Jahanian 9adb2e646c In fragile-abi (32bit mode abi) generate global symbol
objc_category_name_xxx for each category implementation.
(fixes PR7431) patch by Nico Weber.

llvm-svn: 106492
2010-06-21 22:05:18 +00:00
Bruno Cardoso Lopes 510d9a3404 change parameter name to avoid confusion with global definition
llvm-svn: 106486
2010-06-21 21:28:07 +00:00
Fariborz Jahanian 89bdd14f2f In supporting init-priority, globals with the same init_priority must be
emitted in the order in which they are seen (still radar 8076356).

llvm-svn: 106485
2010-06-21 21:27:42 +00:00
Bob Wilson 72df24037e sign_extend_inreg needs to be expanded for pre-v6 Thumb as well as ARM.
Radar 8104310.

llvm-svn: 106484
2010-06-21 21:27:34 +00:00
Jim Grosbach 523e554afa LEApcrelJT shouldn't be marked as neverHasSideEffects, as we don't want it
being moved around away from the jump table it references. rdar://8104340

llvm-svn: 106483
2010-06-21 21:27:27 +00:00
Bruno Cardoso Lopes 374b2195f6 Add unpack and interleave AVX instructions, encoding tests cooming soon
llvm-svn: 106482
2010-06-21 21:21:48 +00:00
Evan Cheng 1fb4de8ec5 Fix PR7421: bug in kill transferring logic. It was ignoring loads / stores which have already been processed.
llvm-svn: 106481
2010-06-21 21:21:14 +00:00
Tom Care 3f272b853f Bug 7377: printf checking fails to flag some undefined behavior
http://llvm.org/bugs/show_bug.cgi?id=7377

Updated format string highlighting and fixits to take advantage of the new CharSourceRange class.
- Change HighlightRange to allow highlighting whitespace only in a CharSourceRange (for warnings about the ' ' (space) flag)
- Change format specifier range helper function to allow for half-open ranges (+1 to end)
- Enabled previously failing tests (FIXMEs/XFAILs removed)
- Small fixes and additions to format string test cases

M       test/Sema/format-strings.c
M       test/Sema/format-strings-fixit.c
M       lib/Frontend/TextDiagnosticPrinter.cpp
M       lib/Sema/SemaChecking.cpp

llvm-svn: 106480
2010-06-21 21:21:01 +00:00