From 2a2b531294245b9a97107e4971d41e932f233b54 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 31 Oct 2001 02:27:26 +0000 Subject: Fix bug when inlining a method that refers to a global variable llvm-svn: 1056 --- llvm/lib/Transforms/IPO/InlineSimple.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Transforms/IPO/InlineSimple.cpp') diff --git a/llvm/lib/Transforms/IPO/InlineSimple.cpp b/llvm/lib/Transforms/IPO/InlineSimple.cpp index ef92b2d07ca..bc320ee330f 100644 --- a/llvm/lib/Transforms/IPO/InlineSimple.cpp +++ b/llvm/lib/Transforms/IPO/InlineSimple.cpp @@ -40,8 +40,8 @@ static inline void RemapInstruction(Instruction *I, for (unsigned op = 0, E = I->getNumOperands(); op != E; ++op) { const Value *Op = I->getOperand(op); Value *V = ValueMap[Op]; - if (!V && (isa(Op) || isa(Op))) - continue; // Methods and constants don't get relocated + if (!V && (isa(Op) || isa(Op))) + continue; // Globals and constants don't get relocated if (!V) { cerr << "Val = " << endl << Op << "Addr = " << (void*)Op << endl; -- cgit v1.2.3