diff options
author | Gabor Greif <ggreif@gmail.com> | 2010-06-25 08:48:19 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2010-06-25 08:48:19 +0000 |
commit | b5874dea6e5d48a6dd4c88c795ba9febf8a3be5e (patch) | |
tree | 43d0539199b3a50a4d8f54d8f80837789f2de0f9 /llvm/lib/CodeGen/GCStrategy.cpp | |
parent | e4eed709d4b6dac3e8a8877bddb2b7b935f13f0f (diff) | |
download | bcm5719-llvm-b5874dea6e5d48a6dd4c88c795ba9febf8a3be5e.tar.gz bcm5719-llvm-b5874dea6e5d48a6dd4c88c795ba9febf8a3be5e.zip |
use ArgOperand API and CallSite to access arguments of CallInst
llvm-svn: 106829
Diffstat (limited to 'llvm/lib/CodeGen/GCStrategy.cpp')
-rw-r--r-- | llvm/lib/CodeGen/GCStrategy.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/GCStrategy.cpp b/llvm/lib/CodeGen/GCStrategy.cpp index 790cb216489..71506cc6abb 100644 --- a/llvm/lib/CodeGen/GCStrategy.cpp +++ b/llvm/lib/CodeGen/GCStrategy.cpp @@ -271,7 +271,7 @@ bool LowerIntrinsics::PerformDefaultLowering(Function &F, GCStrategy &S) { case Intrinsic::gcwrite: if (LowerWr) { // Replace a write barrier with a simple store. - Value *St = new StoreInst(CI->getOperand(1), CI->getOperand(3), CI); + Value *St = new StoreInst(CI->getArgOperand(0), CI->getArgOperand(2), CI); CI->replaceAllUsesWith(St); CI->eraseFromParent(); } @@ -279,7 +279,7 @@ bool LowerIntrinsics::PerformDefaultLowering(Function &F, GCStrategy &S) { case Intrinsic::gcread: if (LowerRd) { // Replace a read barrier with a simple load. - Value *Ld = new LoadInst(CI->getOperand(2), "", CI); + Value *Ld = new LoadInst(CI->getArgOperand(1), "", CI); Ld->takeName(CI); CI->replaceAllUsesWith(Ld); CI->eraseFromParent(); @@ -290,7 +290,7 @@ bool LowerIntrinsics::PerformDefaultLowering(Function &F, GCStrategy &S) { // Initialize the GC root, but do not delete the intrinsic. The // backend needs the intrinsic to flag the stack slot. Roots.push_back(cast<AllocaInst>( - CI->getOperand(1)->stripPointerCasts())); + CI->getArgOperand(0)->stripPointerCasts())); } break; default: |