summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Function.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
-rw-r--r--llvm/lib/IR/Function.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp
index 6af0589f9cc..574ca88e1c9 100644
--- a/llvm/lib/IR/Function.cpp
+++ b/llvm/lib/IR/Function.cpp
@@ -1018,9 +1018,10 @@ bool Intrinsic::isLeaf(ID id) {
Function *Intrinsic::getDeclaration(Module *M, ID id, ArrayRef<Type*> Tys) {
// There can never be multiple globals with the same name of different types,
// because intrinsics must be a specific type.
- return
- cast<Function>(M->getOrInsertFunction(getName(id, Tys),
- getType(M->getContext(), id, Tys)));
+ return cast<Function>(
+ M->getOrInsertFunction(getName(id, Tys),
+ getType(M->getContext(), id, Tys))
+ .getCallee());
}
// This defines the "Intrinsic::getIntrinsicForGCCBuiltin()" method.
OpenPOWER on IntegriCloud