- Mar 09, 2014
-
-
Craig Topper authored
llvm-svn: 203379
-
Craig Topper authored
llvm-svn: 203378
-
David Majnemer authored
llvm-svn: 203377
-
David Majnemer authored
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
-
David Blaikie authored
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
-
David Blaikie authored
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
-
David Blaikie authored
llvm-svn: 203373
-
Argyrios Kyrtzidis authored
rdar://16264844 llvm-svn: 203372
-
Ahmed Charles authored
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
-
Argyrios Kyrtzidis authored
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
-
NAKAMURA Takumi authored
clang-tools-extra/test/pp-trace/pp-trace-modules.cpp: Flush module cache to let robust around r203317. llvm-svn: 203369
-
NAKAMURA Takumi authored
llvm-svn: 203368
-
NAKAMURA Takumi authored
retain-comments-from-system-headers.c: Flush module cache, or incremental test would fail since r203317. llvm-svn: 203367
-
Ahmed Charles authored
llvm-svn: 203366
-
Chandler Carruth authored
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
-
Chandler Carruth authored
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
-
Ted Kremenek authored
[-Wunreachable-code] Tweak heuristic for configuration values to include 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
-
- Mar 08, 2014
-
-
Aaron Ballman authored
[C++11] Replacing Decl iterators attr_begin() and attr_end() with 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
-
Adam Nemet authored
llvm-svn: 203361
-
Argyrios Kyrtzidis authored
llvm-svn: 203360
-
Saleem Abdulrasool authored
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
-
Saleem Abdulrasool authored
strcmp cannot be passed a NULL. Add a short-circuiting check to avoid the possible API misuse. llvm-svn: 203358
-
Saleem Abdulrasool authored
It seems that the original commit missed the curly braces for the scope, always doing the string comparision. llvm-svn: 203357
-
Aaron Ballman authored
llvm-svn: 203356
-
Aaron Ballman authored
[C++11] Replacing RecordDecl iterators field_begin() and field_end() with iterator_range fields(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203355
-
Aaron Ballman authored
Adding range-based STL-like helper APIs. llvm::distance() is the range version of std::distance. llvm::copy is the range version of std::copy. llvm-svn: 203354
-
Aaron Ballman authored
[C++11] Replacing EnumDecl iterators enumerator_begin() and enumerator_end() with iterator_range enumerators(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203353
-
Lang Hames authored
relevant subclasses of RuntimeDyldImpl. This allows construction of RuntimeDyldImpl instances to be deferred until after the target architecture is known. llvm-svn: 203352
-
Aaron Ballman authored
Reapplying r203299 in a slightly different manner. Now range APIs are implemented in terms of iterator APIs. llvm-svn: 203351
-
Virgile Bello authored
llvm-svn: 203350
-
Virgile Bello authored
llvm-svn: 203349
-
Virgile Bello authored
llvm-svn: 203348
-
Duncan P. N. Exon Smith authored
llvm-svn: 203347
-
Ahmed Charles authored
llvm-svn: 203346
-
Craig Topper authored
llvm-svn: 203345
-
Craig Topper authored
llvm-svn: 203344
-
Adam Nemet authored
Args is an output parameter of the function lexCommand but the reference operator was missed. llvm-svn: 203343
-
Craig Topper authored
llvm-svn: 203342
-
Craig Topper authored
De-virtualize a method since it doesn't override anything (yay 'override' keyword) and its class is in an anonymous namespace. llvm-svn: 203341
-
Craig Topper authored
llvm-svn: 203340
-