diff options
author | Philip Reames <listmail@philipreames.com> | 2019-09-04 17:28:48 +0000 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2019-09-04 17:28:48 +0000 |
commit | 27820f99091d6547ed83ff20a2ea689ec68b9bf3 (patch) | |
tree | 38409c890311e770751e58f12beac22ea68f25e3 /llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp | |
parent | 2461061168f4ac4ca8a1823768a00d1c63355b1b (diff) | |
download | bcm5719-llvm-27820f99091d6547ed83ff20a2ea689ec68b9bf3.tar.gz bcm5719-llvm-27820f99091d6547ed83ff20a2ea689ec68b9bf3.zip |
[Instruction] Add hasMetadata(Kind) helper [NFC]
It's a common idiom, so let's add the obvious wrapper for metadata kinds which are basically booleans.
llvm-svn: 370933
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp index a4cdc4f27c4..7dcab7a4965 100644 --- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp @@ -1346,7 +1346,7 @@ Value *AddressSanitizer::isInterestingMemoryAccess(Instruction *I, unsigned *Alignment, Value **MaybeMask) { // Skip memory accesses inserted by another instrumentation. - if (I->getMetadata("nosanitize")) return nullptr; + if (I->hasMetadata("nosanitize")) return nullptr; // Do not instrument the load fetching the dynamic shadow address. if (LocalDynamicShadow == I) @@ -2686,7 +2686,7 @@ bool AddressSanitizer::instrumentFunction(Function &F, if (CS) { // A call inside BB. TempsToInstrument.clear(); - if (CS.doesNotReturn() && !CS->getMetadata("nosanitize")) + if (CS.doesNotReturn() && !CS->hasMetadata("nosanitize")) NoReturnCalls.push_back(CS.getInstruction()); } if (CallInst *CI = dyn_cast<CallInst>(&Inst)) |