aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2010-04-10 02:56:12 +0000
committerGabor Greif <ggreif@gmail.com>2010-04-10 02:56:12 +0000
commit6ba728d9687b2617793f5afd410650a8d6c71080 (patch)
tree6fb4d4422ef88d615ec5f2b90a09c05c00d2206d /lib/CodeGen/CodeGenModule.cpp
parent8bc9c550128c0662a04234dc262628c54c76b1ea (diff)
do not rely on CallInst interna, use CallSite to access arguments
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100918 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--lib/CodeGen/CodeGenModule.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index 01c4f4e57b..2dd2d58308 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/lib/CodeGen/CodeGenModule.cpp
@@ -35,6 +35,7 @@
#include "llvm/LLVMContext.h"
#include "llvm/ADT/Triple.h"
#include "llvm/Target/TargetData.h"
+#include "llvm/Support/CallSite.h"
#include "llvm/Support/ErrorHandling.h"
using namespace clang;
using namespace CodeGen;
@@ -1231,7 +1232,8 @@ static void ReplaceUsesOfNonProtoTypeWithRealFunction(llvm::GlobalValue *Old,
// Okay, we can transform this. Create the new call instruction and copy
// over the required information.
- ArgList.append(CI->op_begin()+1, CI->op_begin()+1+ArgNo);
+ llvm::CallSite CS(CI);
+ ArgList.append(CS.arg_begin(), CS.arg_begin() + ArgNo);
llvm::CallInst *NewCall = llvm::CallInst::Create(NewFn, ArgList.begin(),
ArgList.end(), "", CI);
ArgList.clear();