From: James Y Knight Date: Thu, 31 Jan 2019 21:51:58 +0000 (+0000) Subject: Revert "[opaque pointer types] Add a FunctionCallee wrapper type, and use it." X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9e67ec1f4d6cc8730c25d02c773366cccba10b42;p=clang 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@352800 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index 690773bb57..4bd454411a 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -3056,7 +3056,7 @@ void CodeGenFunction::EmitCfiSlowPathCheck( bool WithDiag = !CGM.getCodeGenOpts().SanitizeTrap.has(Kind); llvm::CallInst *CheckCall; - llvm::FunctionCallee SlowPathFn; + llvm::Constant *SlowPathFn; if (WithDiag) { llvm::Constant *Info = llvm::ConstantStruct::getAnon(StaticArgs); auto *InfoPtr = @@ -3078,8 +3078,7 @@ void CodeGenFunction::EmitCfiSlowPathCheck( CheckCall = Builder.CreateCall(SlowPathFn, {TypeId, Ptr}); } - CGM.setDSOLocal( - cast(SlowPathFn.getCallee()->stripPointerCasts())); + CGM.setDSOLocal(cast(SlowPathFn->stripPointerCasts())); CheckCall->setDoesNotThrow(); EmitBlock(Cont);