Switch more loops to be range-based

This makes the code a little more concise, no functional change is
intended.

llvm-svn: 273644
This commit is contained in:
David Majnemer
2016-06-24 04:05:21 +00:00
parent 024402dcdf
commit d770877328
14 changed files with 52 additions and 68 deletions

View File

@@ -326,9 +326,7 @@ void ThreadSanitizer::chooseInstructionsToInstrument(
const DataLayout &DL) {
SmallSet<Value*, 8> WriteTargets;
// Iterate from the end.
for (SmallVectorImpl<Instruction*>::reverse_iterator It = Local.rbegin(),
E = Local.rend(); It != E; ++It) {
Instruction *I = *It;
for (Instruction *I : reverse(Local)) {
if (StoreInst *Store = dyn_cast<StoreInst>(I)) {
Value *Addr = Store->getPointerOperand();
if (!shouldInstrumentReadWriteFromAddress(Addr))