aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2016-06-24 04:05:21 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2016-06-24 04:05:21 +0000
commitd7708773288c4f33bf98c724f7a486b5973b8cc6 (patch)
treeda2706e419335edde86f19e16552adcc1da3cd21 /llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp
parent024402dcdf0c45b48b15d9a5de7f841e61e9bedc (diff)
downloadllvm-d7708773288c4f33bf98c724f7a486b5973b8cc6.zip
llvm-d7708773288c4f33bf98c724f7a486b5973b8cc6.tar.gz
llvm-d7708773288c4f33bf98c724f7a486b5973b8cc6.tar.bz2
Switch more loops to be range-based
This makes the code a little more concise, no functional change is intended. llvm-svn: 273644
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp')
-rw-r--r--llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp
index 287d5bf..a23b1dd 100644
--- a/llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp
@@ -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))