use ArgOperand API

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107277 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Gabor Greif 2010-06-30 12:40:35 +00:00
parent d0fcab9154
commit e9af352d74

View File

@ -268,8 +268,8 @@ bool StripDebugDeclare::runOnModule(Module &M) {
if (Declare) { if (Declare) {
while (!Declare->use_empty()) { while (!Declare->use_empty()) {
CallInst *CI = cast<CallInst>(Declare->use_back()); CallInst *CI = cast<CallInst>(Declare->use_back());
Value *Arg1 = CI->getOperand(1); Value *Arg1 = CI->getArgOperand(0);
Value *Arg2 = CI->getOperand(2); Value *Arg2 = CI->getArgOperand(1);
assert(CI->use_empty() && "llvm.dbg intrinsic should have void result"); assert(CI->use_empty() && "llvm.dbg intrinsic should have void result");
CI->eraseFromParent(); CI->eraseFromParent();
if (Arg1->use_empty()) { if (Arg1->use_empty()) {