From: Gabor Greif Date: Wed, 25 Mar 2009 06:32:59 +0000 (+0000) Subject: do not rely on callee being operand 0 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=0c8f7dc67cebcb1eef5984baaa4802cb46f72797;p=oota-llvm.git do not rely on callee being operand 0 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67681 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/CppBackend/CPPBackend.cpp b/lib/Target/CppBackend/CPPBackend.cpp index 9f9c1c41360..8262408d15c 100644 --- a/lib/Target/CppBackend/CPPBackend.cpp +++ b/lib/Target/CppBackend/CPPBackend.cpp @@ -1366,7 +1366,7 @@ namespace { } case Instruction::Call:{ const CallInst* call = cast(I); - if (InlineAsm* ila = dyn_cast(call->getOperand(0))) { + if (const InlineAsm* ila = dyn_cast(call->getCalledValue())) { Out << "InlineAsm* " << getCppName(ila) << " = InlineAsm::get(" << getCppName(ila->getFunctionType()) << ", \"" << ila->getAsmString() << "\", \""