From fadf25068e32b44b010e6e03c6ab93bec41eae82 Mon Sep 17 00:00:00 2001 From: James Y Knight Date: Thu, 31 Jan 2019 21:51:58 +0000 Subject: 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 --- llvm/lib/Target/AMDGPU/AMDGPULibFunc.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'llvm/lib/Target/AMDGPU/AMDGPULibFunc.cpp') diff --git a/llvm/lib/Target/AMDGPU/AMDGPULibFunc.cpp b/llvm/lib/Target/AMDGPU/AMDGPULibFunc.cpp index 09322594dc8..569895c25cb 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPULibFunc.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPULibFunc.cpp @@ -960,8 +960,8 @@ Function *AMDGPULibFunc::getFunction(Module *M, const AMDGPULibFunc &fInfo) { return nullptr; } -FunctionCallee AMDGPULibFunc::getOrInsertFunction(Module *M, - const AMDGPULibFunc &fInfo) { +Function *AMDGPULibFunc::getOrInsertFunction(Module *M, + const AMDGPULibFunc &fInfo) { std::string const FuncName = fInfo.mangle(); Function *F = dyn_cast_or_null( M->getValueSymbolTable().lookup(FuncName)); @@ -987,7 +987,7 @@ FunctionCallee AMDGPULibFunc::getOrInsertFunction(Module *M, } } - FunctionCallee C; + Constant *C = nullptr; if (hasPtr) { // Do not set extra attributes for functions with pointer arguments. C = M->getOrInsertFunction(FuncName, FuncTy); @@ -1001,7 +1001,7 @@ FunctionCallee AMDGPULibFunc::getOrInsertFunction(Module *M, C = M->getOrInsertFunction(FuncName, FuncTy, Attr); } - return C; + return cast(C); } bool UnmangledFuncInfo::lookup(StringRef Name, ID &Id) { -- cgit v1.2.3