summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-0921-310/+314
| | | | | | class. llvm-svn: 203378
* Update clang to account for changes made to LLVM in r203376David Majnemer2014-03-093-3/+3
| | | | llvm-svn: 203377
* IR: Change inalloca's grammar a bitDavid Majnemer2014-03-0912-40/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The grammar for LLVM IR is not well specified in any document but seems to obey the following rules: - Attributes which have parenthesized arguments are never preceded by commas. This form of attribute is the only one which ever has optional arguments. However, not all of these attributes support optional arguments: 'thread_local' supports an optional argument but 'addrspace' does not. Interestingly, 'addrspace' is documented as being a "qualifier". What constitutes a qualifier? I cannot find a definition. - Some attributes use a space between the keyword and the value. Examples of this form are 'align' and 'section'. These are always preceded by a comma. - Otherwise, the attribute has no argument. These attributes do not have a preceding comma. Sometimes an attribute goes before the instruction, between the instruction and it's type, or after it's type. 'atomicrmw' has 'volatile' between the instruction and the type while 'call' has 'tail' preceding the instruction. With all this in mind, it seems most consistent for 'inalloca' on an 'inalloca' instruction to occur before between the instruction and the type. Unlike the current formulation, there would be no preceding comma. The combination 'alloca inalloca' doesn't look particularly appetizing, perhaps a better spelling of 'inalloca' is down the road. llvm-svn: 203376
* Revert "Clean up SmallString a bit"David Blaikie2014-03-095-49/+49
| | | | | | | | | This reverts commit r203374. Ambiguities in assign... oh well. I'm just going to revert this and probably not try to recommit it as it's not terribly important. llvm-svn: 203375
* Clean up SmallString a bitDavid Blaikie2014-03-095-49/+49
| | | | | | | | | | | Move a common utility (assign(iter, iter)) into SmallVector (some of the others could be moved there too, but this one seemed particularly generic) and replace repetitions overrides with using directives. And simplify SmallVector::assign(num, element) while I'm here rather than thrashing these files (that cause everyone to rebuild) again. llvm-svn: 203374
* Remove uses of SmallString::equals in favor of SmallVectorImpl<char>'s ↵David Blaikie2014-03-092-2/+2
| | | | | | operator== llvm-svn: 203373
* [Sema] Fix assertion hit with #pragma weak.Argyrios Kyrtzidis2014-03-092-0/+5
| | | | | | rdar://16264844 llvm-svn: 203372
* [C++11] Fix break due to MSVC bug.Ahmed Charles2014-03-091-1/+2
| | | | | | | | | | | | | | | MSVC (2012, 2013, 2013 Nov CTP) fail on the following code: int main() { int arr[] = {1, 2}; for (int i : arr) do {} while (0); } The fix is to put {} around the for loop. I've reported this to the MSVC team. llvm-svn: 203371
* [libclang] Don't pad the main buffer for the preamble.Argyrios Kyrtzidis2014-03-094-44/+32
| | | | | | | | | Padding does not seem to be useful currently, and it leads to bogus location if an error points to the end of the file. rdar://15836513 llvm-svn: 203370
* clang-tools-extra/test/pp-trace/pp-trace-modules.cpp: Flush module cache to ↵NAKAMURA Takumi2014-03-091-0/+1
| | | | | | let robust around r203317. llvm-svn: 203369
* clang-tools-extra/test/pp-trace/pp-trace-modules.cpp: Use [[@LINE]].NAKAMURA Takumi2014-03-091-6/+9
| | | | llvm-svn: 203368
* retain-comments-from-system-headers.c: Flush module cache, or incremental ↵NAKAMURA Takumi2014-03-091-0/+1
| | | | | | test would fail since r203317. llvm-svn: 203367
* Fix build break.Ahmed Charles2014-03-091-0/+2
| | | | llvm-svn: 203366
* [C++11] Update Clang for the change to LLVM's Use-Def chain iterators inChandler Carruth2014-03-096-14/+10
| | | | | | | | | r203364: what was use_iterator is now user_iterator, and there is a use_iterator for directly iterating over the uses. This also switches to use the range-based APIs where appropriate. llvm-svn: 203365
* [C++11] Add range based accessors for the Use-Def chain of a Value.Chandler Carruth2014-03-09100-1075/+920
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This requires a number of steps. 1) Move value_use_iterator into the Value class as an implementation detail 2) Change it to actually be a *Use* iterator rather than a *User* iterator. 3) Add an adaptor which is a User iterator that always looks through the Use to the User. 4) Wrap these in Value::use_iterator and Value::user_iterator typedefs. 5) Add the range adaptors as Value::uses() and Value::users(). 6) Update *all* of the callers to correctly distinguish between whether they wanted a use_iterator (and to explicitly dig out the User when needed), or a user_iterator which makes the Use itself totally opaque. Because #6 requires churning essentially everything that walked the Use-Def chains, I went ahead and added all of the range adaptors and switched them to range-based loops where appropriate. Also because the renaming requires at least churning every line of code, it didn't make any sense to split these up into multiple commits -- all of which would touch all of the same lies of code. The result is still not quite optimal. The Value::use_iterator is a nice regular iterator, but Value::user_iterator is an iterator over User*s rather than over the User objects themselves. As a consequence, it fits a bit awkwardly into the range-based world and it has the weird extra-dereferencing 'operator->' that so many of our iterators have. I think this could be fixed by providing something which transforms a range of T&s into a range of T*s, but that *can* be separated into another patch, and it isn't yet 100% clear whether this is the right move. However, this change gets us most of the benefit and cleans up a substantial amount of code around Use and User. =] llvm-svn: 203364
* [-Wunreachable-code] Tweak heuristic for configuration values to include ↵Ted Kremenek2014-03-082-6/+35
| | | | | | | | | arithmetic operations involving sizeof(), but not raw integers. This case was motivated by a false positive with the llvm::AlignOf<> specialization in LLVM. llvm-svn: 203363
* [C++11] Replacing Decl iterators attr_begin() and attr_end() with ↵Aaron Ballman2014-03-0813-77/+62
| | | | | | | | iterator_range attrs(). Updating all of the usages of the iterators with range-based for loops. This is a reapplication of r203236 with modifications to the definition of attrs() and following the new style guidelines on auto usage. llvm-svn: 203362
* Update comment from r203315 based on reviewAdam Nemet2014-03-081-1/+1
| | | | llvm-svn: 203361
* [Preprocessor] Only check for -Wunused-macros if the translation unit kind ↵Argyrios Kyrtzidis2014-03-081-1/+1
| | | | | | is TU_Complete. llvm-svn: 203360
* POSIX: fix possible API misuseSaleem Abdulrasool2014-03-081-5/+5
| | | | | | | | | memcpy cannot be passed NULL. Ensuring that the destination pointer is non-NULL requires checking success. Rather than performing the success check at that point, increasing indentation an additional level, fold it into the previous statement. llvm-svn: 203359
* POSIX: fix possible invalid API usageSaleem Abdulrasool2014-03-081-1/+1
| | | | | | | strcmp cannot be passed a NULL. Add a short-circuiting check to avoid the possible API misuse. llvm-svn: 203358
* POSIX: add missing curly bracesSaleem Abdulrasool2014-03-081-0/+2
| | | | | | | It seems that the original commit missed the curly braces for the scope, always doing the string comparision. llvm-svn: 203357
* Adding some includes to appease build bots. Amends r203354Aaron Ballman2014-03-081-3/+5
| | | | llvm-svn: 203356
* [C++11] Replacing RecordDecl iterators field_begin() and field_end() with ↵Aaron Ballman2014-03-0836-303/+151
| | | | | | iterator_range fields(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203355
* Adding range-based STL-like helper APIs. llvm::distance() is the range ↵Aaron Ballman2014-03-081-0/+22
| | | | | | version of std::distance. llvm::copy is the range version of std::copy. llvm-svn: 203354
* [C++11] Replacing EnumDecl iterators enumerator_begin() and enumerator_end() ↵Aaron Ballman2014-03-0810-32/+28
| | | | | | with iterator_range enumerators(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203353
* Make createObjectImage and createObjectImageFromFile static methods on theLang Hames2014-03-084-74/+70
| | | | | | | | relevant subclasses of RuntimeDyldImpl. This allows construction of RuntimeDyldImpl instances to be deferred until after the target architecture is known. llvm-svn: 203352
* Reapplying r203299 in a slightly different manner. Now range APIs are ↵Aaron Ballman2014-03-085-52/+34
| | | | | | implemented in terms of iterator APIs. llvm-svn: 203351
* Implement ObjectFilePECOFF::SetLoadAddress().Virgile Bello2014-03-082-0/+46
| | | | llvm-svn: 203350
* Remove %zx in printf (only GCC supports it, not MSVC).Virgile Bello2014-03-083-5/+6
| | | | llvm-svn: 203349
* Add inttypes.h to SBQueue.cpp (MSVC compilation error with PRIx32).Virgile Bello2014-03-081-0/+2
| | | | llvm-svn: 203348
* Change else if => if after return, after r203265Duncan P. N. Exon Smith2014-03-081-8/+9
| | | | llvm-svn: 203347
* Fix 80 cols.Ahmed Charles2014-03-081-1/+1
| | | | llvm-svn: 203346
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-0822-204/+207
| | | | | | class. llvm-svn: 203345
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-0816-237/+229
| | | | | | class. llvm-svn: 203344
* [bugpoint] Don't ignore arg in -compile-commad="tool arg"Adam Nemet2014-03-081-1/+1
| | | | | | | Args is an output parameter of the function lexCommand but the reference operator was missed. llvm-svn: 203343
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-085-36/+36
| | | | | | class. llvm-svn: 203342
* De-virtualize a method since it doesn't override anything (yay 'override' ↵Craig Topper2014-03-081-1/+1
| | | | | | keyword) and its class is in an anonymous namespace. llvm-svn: 203341
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-0812-348/+343
| | | | | | class. llvm-svn: 203340
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-0819-114/+115
| | | | | | class. llvm-svn: 203339
* Revert "Experimentally enable --verify-debug-info on some testcases and see if"Adrian Prantl2014-03-082-2/+2
| | | | | | | | | Some of the buildbots need to be upgraded to a more recen version of dwarfdump first. Reverting for now. llvm-svn: 203338
* DebugInfo: further improvements to test following up on r203329David Blaikie2014-03-081-7/+7
| | | | llvm-svn: 203337
* [-Wunreachabe-code] Don't warn about unreachable destructors for temporaries.Ted Kremenek2014-03-082-3/+18
| | | | | | | | This can possibly be refined later, but right now the experience is so incomprehensible for a user to understand what is going on this isn't a useful warning. llvm-svn: 203336
* Fix CFG bug where the 'isTemporaryDtorsBranch' bit was silently lost for ↵Ted Kremenek2014-03-083-13/+21
| | | | | | terminators. llvm-svn: 203335
* [CFG] Record would-be successor for noreturn destructor.Ted Kremenek2014-03-081-2/+4
| | | | llvm-svn: 203334
* [-Wunreachable-code] Handle 'return' with no argument dominated by ↵Ted Kremenek2014-03-082-6/+16
| | | | | | 'noreturn' function. llvm-svn: 203333
* Need to use rm -rf on dSYM bundle directories.Jason Molenda2014-03-081-2/+3
| | | | llvm-svn: 203332
* Remove extra space.Rui Ueyama2014-03-081-1/+1
| | | | llvm-svn: 203331
* Add API logging to the SBQueue/SBQueueItem/SBThread calls.Jason Molenda2014-03-083-8/+77
| | | | llvm-svn: 203330
* DebugInfo: Fix test fallout from r203323David Blaikie2014-03-081-1/+1
| | | | | | Will fix this harder in a moment. llvm-svn: 203329
OpenPOWER on IntegriCloud