mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
[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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user