use abstract interface in two more places
authorGabor Greif <ggreif@gmail.com>
Thu, 8 Apr 2010 13:50:42 +0000 (13:50 +0000)
committerGabor Greif <ggreif@gmail.com>
Thu, 8 Apr 2010 13:50:42 +0000 (13:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100762 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/CBackend/CBackend.cpp

index c87fadb8a6384b0df97579bd707c9ef8e6229d8a..5e16a0824d1d174e2a2a1d5f9929542c25fcaf45 100644 (file)
@@ -2858,7 +2858,7 @@ void CWriter::lowerIntrinsics(Function &F) {
 }
 
 void CWriter::visitCallInst(CallInst &I) {
-  if (isa<InlineAsm>(I.getOperand(0)))
+  if (isa<InlineAsm>(I.getCalledValue()))
     return visitInlineAsm(I);
 
   bool WroteCallee = false;
@@ -3165,7 +3165,7 @@ static std::string gccifyAsm(std::string asmstr) {
 //TODO: assumptions about what consume arguments from the call are likely wrong
 //      handle communitivity
 void CWriter::visitInlineAsm(CallInst &CI) {
-  InlineAsm* as = cast<InlineAsm>(CI.getOperand(0));
+  InlineAsm* as = cast<InlineAsm>(CI.getCalledValue());
   std::vector<InlineAsm::ConstraintInfo> Constraints = as->ParseConstraints();
   
   std::vector<std::pair<Value*, int> > ResultVals;