- Mar 09, 2014
-
-
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
-
Craig Topper authored
llvm-svn: 203339
-
Adrian Prantl authored
Some of the buildbots need to be upgraded to a more recen version of dwarfdump first. Reverting for now. llvm-svn: 203338
-
David Blaikie authored
llvm-svn: 203337
-
Ted Kremenek authored
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
-
Ted Kremenek authored
llvm-svn: 203335
-
Ted Kremenek authored
llvm-svn: 203334
-
Ted Kremenek authored
llvm-svn: 203333
-
Jason Molenda authored
llvm-svn: 203332
-
Rui Ueyama authored
llvm-svn: 203331
-
Jason Molenda authored
llvm-svn: 203330
-
David Blaikie authored
Will fix this harder in a moment. llvm-svn: 203329
-
Rui Ueyama authored
llvm-svn: 203328
-
Adrian Prantl authored
the buildbots can take it. llvm-svn: 203327
-
Adrian Prantl authored
llvm-svn: 203326
-
Rafael Espindola authored
An option with the same name already exists in the makefile build. The name CLANG_IS_PRODUCTION is historical. We should probably change it, but should change the configure build at the same time. llvm-svn: 203325
-