diff options
author | Gabor Greif <ggreif@gmail.com> | 2010-04-10 02:56:12 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2010-04-10 02:56:12 +0000 |
commit | d0ef1346f3e219ff55f3f4cb6cfcade6547ff933 (patch) | |
tree | 772d5ac2bd880cf64f10424a34bf68cfeef5fb9d /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 4364558956435b0c97f35f2ffaaafa55bf849c91 (diff) | |
download | bcm5719-llvm-d0ef1346f3e219ff55f3f4cb6cfcade6547ff933.tar.gz bcm5719-llvm-d0ef1346f3e219ff55f3f4cb6cfcade6547ff933.zip |
do not rely on CallInst interna, use CallSite to access arguments
llvm-svn: 100918
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 01c4f4e57ba..2dd2d583087 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/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(); |