[cfe-commits] r100918 - /cfe/trunk/lib/CodeGen/CodeGenModule.cpp
Gabor Greif
ggreif at gmail.com
Fri Apr 9 19:56:12 PDT 2010
Author: ggreif
Date: Fri Apr 9 21:56:12 2010
New Revision: 100918
URL: http://llvm.org/viewvc/llvm-project?rev=100918&view=rev
Log:
do not rely on CallInst interna, use CallSite to access arguments
Modified:
cfe/trunk/lib/CodeGen/CodeGenModule.cpp
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=100918&r1=100917&r2=100918&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Fri Apr 9 21:56:12 2010
@@ -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 @@
// 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();
More information about the cfe-commits
mailing list