summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/CrossDSOCFI.cpp
diff options
context:
space:
mode:
authorJames Y Knight <jyknight@google.com>2019-01-31 21:51:58 +0000
committerJames Y Knight <jyknight@google.com>2019-01-31 21:51:58 +0000
commitfadf25068e32b44b010e6e03c6ab93bec41eae82 (patch)
tree9b22878f495e0b75d9e86cd01bcf199308dc9234 /llvm/lib/Transforms/IPO/CrossDSOCFI.cpp
parentc62214da3de04f702e29e4ba4772c9463e2829ca (diff)
downloadbcm5719-llvm-fadf25068e32b44b010e6e03c6ab93bec41eae82.tar.gz
bcm5719-llvm-fadf25068e32b44b010e6e03c6ab93bec41eae82.zip
Revert "[opaque pointer types] Add a FunctionCallee wrapper type, and use it."
This reverts commit f47d6b38c7a61d50db4566b02719de05492dcef1 (r352791). Seems to run into compilation failures with GCC (but not clang, where I tested it). Reverting while I investigate. llvm-svn: 352800
Diffstat (limited to 'llvm/lib/Transforms/IPO/CrossDSOCFI.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/CrossDSOCFI.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/IPO/CrossDSOCFI.cpp b/llvm/lib/Transforms/IPO/CrossDSOCFI.cpp
index e30b33aa487..83fa106df79 100644
--- a/llvm/lib/Transforms/IPO/CrossDSOCFI.cpp
+++ b/llvm/lib/Transforms/IPO/CrossDSOCFI.cpp
@@ -105,10 +105,10 @@ void CrossDSOCFI::buildCFICheck(Module &M) {
}
LLVMContext &Ctx = M.getContext();
- FunctionCallee C = M.getOrInsertFunction(
+ Constant *C = M.getOrInsertFunction(
"__cfi_check", Type::getVoidTy(Ctx), Type::getInt64Ty(Ctx),
Type::getInt8PtrTy(Ctx), Type::getInt8PtrTy(Ctx));
- Function *F = dyn_cast<Function>(C.getCallee());
+ Function *F = dyn_cast<Function>(C);
// Take over the existing function. The frontend emits a weak stub so that the
// linker knows about the symbol; this pass replaces the function body.
F->deleteBody();
@@ -132,9 +132,9 @@ void CrossDSOCFI::buildCFICheck(Module &M) {
BasicBlock *TrapBB = BasicBlock::Create(Ctx, "fail", F);
IRBuilder<> IRBFail(TrapBB);
- FunctionCallee CFICheckFailFn =
- M.getOrInsertFunction("__cfi_check_fail", Type::getVoidTy(Ctx),
- Type::getInt8PtrTy(Ctx), Type::getInt8PtrTy(Ctx));
+ Constant *CFICheckFailFn = M.getOrInsertFunction(
+ "__cfi_check_fail", Type::getVoidTy(Ctx), Type::getInt8PtrTy(Ctx),
+ Type::getInt8PtrTy(Ctx));
IRBFail.CreateCall(CFICheckFailFn, {&CFICheckFailData, &Addr});
IRBFail.CreateBr(ExitBB);
OpenPOWER on IntegriCloud