diff options
author | Kostya Serebryany <kcc@google.com> | 2013-02-20 12:35:15 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2013-02-20 12:35:15 +0000 |
commit | 1479c9bb392325688b72e5829bbb7939c4a079a4 (patch) | |
tree | 0c17bdc91d164eba3d2285f92f57b2dddece0e45 /lib/Transforms/Instrumentation/AddressSanitizer.cpp | |
parent | af3a5420aeb421e83694745c53141683caa123cb (diff) | |
download | llvm-1479c9bb392325688b72e5829bbb7939c4a079a4.tar.gz llvm-1479c9bb392325688b72e5829bbb7939c4a079a4.tar.bz2 llvm-1479c9bb392325688b72e5829bbb7939c4a079a4.tar.xz |
[asan] instrument invoke insns with noreturn attribute (as well as call insns)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175617 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation/AddressSanitizer.cpp')
-rw-r--r-- | lib/Transforms/Instrumentation/AddressSanitizer.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/lib/Transforms/Instrumentation/AddressSanitizer.cpp index 1d59ba51d9..f116657192 100644 --- a/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/lib/Transforms/Instrumentation/AddressSanitizer.cpp @@ -35,6 +35,7 @@ #include "llvm/IR/Module.h" #include "llvm/IR/Type.h" #include "llvm/InstVisitor.h" +#include "llvm/Support/CallSite.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/DataTypes.h" #include "llvm/Support/Debug.h" @@ -1130,12 +1131,12 @@ bool AddressSanitizer::runOnFunction(Function &F) { } else if (isa<MemIntrinsic>(BI) && ClMemIntrin) { // ok, take it. } else { - if (CallInst *CI = dyn_cast<CallInst>(BI)) { + CallSite CS(BI); + if (CS) { // A call inside BB. TempsToInstrument.clear(); - if (CI->doesNotReturn()) { - NoReturnCalls.push_back(CI); - } + if (CS.doesNotReturn()) + NoReturnCalls.push_back(CS.getInstruction()); } continue; } |