diff options
| author | 2019-06-23 21:36:31 +0000 | |
|---|---|---|
| committer | 2019-06-23 21:36:31 +0000 | |
| commit | 23f101f37937a1bd4a29726cab2f76e0fb038b35 (patch) | |
| tree | f7da7d6b32c2e07114da399150bfa88d72187012 /gnu/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp | |
| parent | sort previous; ok deraadt (diff) | |
| download | wireguard-openbsd-23f101f37937a1bd4a29726cab2f76e0fb038b35.tar.xz wireguard-openbsd-23f101f37937a1bd4a29726cab2f76e0fb038b35.zip | |
Import LLVM 8.0.0 release including clang, lld and lldb.
Diffstat (limited to 'gnu/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp')
| -rw-r--r-- | gnu/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gnu/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp b/gnu/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp index f03fcc9c4e2..4c3c6c9adde 100644 --- a/gnu/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp +++ b/gnu/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp @@ -645,8 +645,8 @@ DataFlowSanitizer::buildWrapperFunction(Function *F, StringRef NewFName, GlobalValue::LinkageTypes NewFLink, FunctionType *NewFT) { FunctionType *FT = F->getFunctionType(); - Function *NewF = Function::Create(NewFT, NewFLink, NewFName, - F->getParent()); + Function *NewF = Function::Create(NewFT, NewFLink, F->getAddressSpace(), + NewFName, F->getParent()); NewF->copyAttributesFrom(F); NewF->removeAttributes( AttributeList::ReturnIndex, @@ -819,7 +819,8 @@ bool DataFlowSanitizer::runOnModule(Module &M) { // easily identify cases of mismatching ABIs. if (getInstrumentedABI() == IA_Args && !IsZeroArgsVoidRet) { FunctionType *NewFT = getArgsFunctionType(FT); - Function *NewF = Function::Create(NewFT, F.getLinkage(), "", &M); + Function *NewF = Function::Create(NewFT, F.getLinkage(), + F.getAddressSpace(), "", &M); NewF->copyAttributesFrom(&F); NewF->removeAttributes( AttributeList::ReturnIndex, @@ -924,7 +925,7 @@ bool DataFlowSanitizer::runOnModule(Module &M) { Instruction *Next = Inst->getNextNode(); // DFSanVisitor may delete Inst, so keep track of whether it was a // terminator. - bool IsTerminator = isa<TerminatorInst>(Inst); + bool IsTerminator = Inst->isTerminator(); if (!DFSF.SkipInsts.count(Inst)) DFSanVisitor(DFSF).visit(Inst); if (IsTerminator) |
