diff options
author | David Chisnall <csdavec@swan.ac.uk> | 2010-05-02 13:41:58 +0000 |
---|---|---|
committer | David Chisnall <csdavec@swan.ac.uk> | 2010-05-02 13:41:58 +0000 |
commit | 4b02afcb45cd1a384de7d45f440a8be091dd500b (patch) | |
tree | b57c3aab07afd5d632f3a6aee73a96ecc5e7c383 /lib/CodeGen/CGObjCGNU.cpp | |
parent | 06a9f3680d22529a2fcf20c52d71cf221d99d910 (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/CGObjCGNU.cpp')
-rw-r--r-- | lib/CodeGen/CGObjCGNU.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/CodeGen/CGObjCGNU.cpp b/lib/CodeGen/CGObjCGNU.cpp index 8afce6204d..3c51b7ee9d 100644 --- a/lib/CodeGen/CGObjCGNU.cpp +++ b/lib/CodeGen/CGObjCGNU.cpp @@ -566,8 +566,11 @@ CGObjCGNU::GenerateMessageSendSuper(CodeGen::CodeGenFunction &CGF, }; llvm::MDNode *node = llvm::MDNode::get(VMContext, impMD, 3); - return CGF.EmitCall(FnInfo, imp, ReturnValueSlot(), ActualArgs, - 0, msgSendMDKind, node); + llvm::Instruction *call; + RValue msgRet = CGF.EmitCall(FnInfo, imp, ReturnValueSlot(), ActualArgs, + 0, &call); + call->setMetadata(msgSendMDKind, node); + return msgRet; } /// Generate code for a message send expression. @@ -707,8 +710,10 @@ CGObjCGNU::GenerateMessageSend(CodeGen::CodeGenFunction &CGF, imp = Builder.CreateCall2(lookupFunction, Receiver, cmd); cast<llvm::CallInst>(imp)->setMetadata(msgSendMDKind, node); } + llvm::Instruction *call; RValue msgRet = CGF.EmitCall(FnInfo, imp, ReturnValueSlot(), ActualArgs, - 0, msgSendMDKind, node); + 0, &call); + call->setMetadata(msgSendMDKind, node); if (!isPointerSizedReturn) { CGF.EmitBlock(contiueBB); |