aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-02-20 18:06:48 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-02-20 18:06:48 +0000
commitc0ef9f59937c3971c48b6fed37cf5bd8985c024b (patch)
tree5cc83e25acc874fda399923131dd15ef30e2a0f8 /lib/CodeGen/CGCall.cpp
parent67956052ea5fb0cd7f443de96a11f9a0176dc681 (diff)
Set call attribute for direct calls (i.e. noreturn).
- Remove an unused variant of EmitCallExpr overload. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65130 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r--lib/CodeGen/CGCall.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index 42f671a7e6..d0122fa4f9 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -1676,7 +1676,8 @@ void CodeGenFunction::EmitFunctionEpilog(const CGFunctionInfo &FI,
RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
llvm::Value *Callee,
- const CallArgList &CallArgs) {
+ const CallArgList &CallArgs,
+ const Decl *TargetDecl) {
// FIXME: We no longer need the types from CallArgs; lift up and
// simplify.
llvm::SmallVector<llvm::Value*, 16> Args;
@@ -1752,9 +1753,8 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
llvm::CallInst *CI = Builder.CreateCall(Callee,&Args[0],&Args[0]+Args.size());
- // FIXME: Provide TargetDecl so nounwind, noreturn, etc, etc get set.
CodeGen::AttributeListType AttributeList;
- CGM.ConstructAttributeList(CallInfo, 0, AttributeList);
+ CGM.ConstructAttributeList(CallInfo, TargetDecl, AttributeList);
CI->setAttributes(llvm::AttrListPtr::get(AttributeList.begin(),
AttributeList.size()));