git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220985
91177308-0d34-0410-b5e6-
96231b3b80d8
for (auto I : IndirCalls) {
IRBuilder<> IRB(I);
CallSite CS(I);
for (auto I : IndirCalls) {
IRBuilder<> IRB(I);
CallSite CS(I);
+ Value *Callee = CS.getCalledValue();
+ if (dyn_cast<InlineAsm>(Callee)) continue;
GlobalVariable *CalleeCache = new GlobalVariable(
*F.getParent(), Ty, false, GlobalValue::PrivateLinkage,
Constant::getNullValue(Ty), "__asan_gen_callee_cache");
CalleeCache->setAlignment(kCacheAlignment);
IRB.CreateCall2(AsanCovIndirCallFunction,
GlobalVariable *CalleeCache = new GlobalVariable(
*F.getParent(), Ty, false, GlobalValue::PrivateLinkage,
Constant::getNullValue(Ty), "__asan_gen_callee_cache");
CalleeCache->setAlignment(kCacheAlignment);
IRB.CreateCall2(AsanCovIndirCallFunction,
- IRB.CreatePointerCast(CS.getCalledValue(), IntptrTy),
+ IRB.CreatePointerCast(Callee, IntptrTy),
IRB.CreatePointerCast(CalleeCache, IntptrTy));
}
}
IRB.CreatePointerCast(CalleeCache, IntptrTy));
}
}
%1 = load void (%struct.StructWithVptr*)** %vtable, align 8
tail call void %1(%struct.StructWithVptr* %foo)
tail call void %1(%struct.StructWithVptr* %foo)
%1 = load void (%struct.StructWithVptr*)** %vtable, align 8
tail call void %1(%struct.StructWithVptr* %foo)
tail call void %1(%struct.StructWithVptr* %foo)
+ tail call void asm sideeffect "", ""()