aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorDavid Chisnall <csdavec@swan.ac.uk>2010-05-02 13:41:58 +0000
committerDavid Chisnall <csdavec@swan.ac.uk>2010-05-02 13:41:58 +0000
commit4b02afcb45cd1a384de7d45f440a8be091dd500b (patch)
treeb57c3aab07afd5d632f3a6aee73a96ecc5e7c383 /lib/CodeGen/CGCall.cpp
parent06a9f3680d22529a2fcf20c52d71cf221d99d910 (diff)
As per Chris' request, return the Instruction from EmitCall and add the metadata in the caller.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102862 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r--lib/CodeGen/CGCall.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index f7db0d19a2..92d15d9d8c 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -870,8 +870,7 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
ReturnValueSlot ReturnValue,
const CallArgList &CallArgs,
const Decl *TargetDecl,
- unsigned MDKind,
- llvm::MDNode *Metadata) {
+ llvm::Instruction **callOrInvoke) {
// FIXME: We no longer need the types from CallArgs; lift up and simplify.
llvm::SmallVector<llvm::Value*, 16> Args;
@@ -997,8 +996,8 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
Args.data(), Args.data()+Args.size());
EmitBlock(Cont);
}
- if (Metadata) {
- CS->setMetadata(MDKind, Metadata);
+ if (callOrInvoke) {
+ *callOrInvoke = CS.getInstruction();
}
CS.setAttributes(Attrs);