From 7f74a56e2436c40b18a672ad7d58727cd6832329 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 20 Jan 2002 22:54:45 +0000 Subject: Changes to build successfully with GCC 3.02 llvm-svn: 1503 --- llvm/lib/Transforms/IPO/InlineSimple.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 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 40b98bd67de..9d86c868953 100644 --- a/llvm/lib/Transforms/IPO/InlineSimple.cpp +++ b/llvm/lib/Transforms/IPO/InlineSimple.cpp @@ -27,6 +27,8 @@ #include "llvm/iOther.h" #include #include +#include +using std::cerr; #include "llvm/Assembly/Writer.h" @@ -36,7 +38,7 @@ using namespace opt; // current values into those specified by ValueMap. // static inline void RemapInstruction(Instruction *I, - map &ValueMap) { + std::map &ValueMap) { for (unsigned op = 0, E = I->getNumOperands(); op != E; ++op) { const Value *Op = I->getOperand(op); @@ -45,8 +47,8 @@ static inline void RemapInstruction(Instruction *I, continue; // Globals and constants don't get relocated if (!V) { - cerr << "Val = " << endl << Op << "Addr = " << (void*)Op << endl; - cerr << "Inst = " << I; + cerr << "Val = \n" << Op << "Addr = " << (void*)Op; + cerr << "\nInst = " << I; } assert(V && "Referenced value not in value map!"); I->setOperand(op, V); @@ -72,10 +74,9 @@ bool opt::InlineMethod(BasicBlock::iterator CIIt) { const Method *CalledMeth = CI->getCalledMethod(); if (CalledMeth == 0 || // Can't inline external method or indirect call! CalledMeth->isExternal()) return false; - Method *CurrentMeth = CI->getParent()->getParent(); //cerr << "Inlining " << CalledMeth->getName() << " into " - // << CurrentMeth->getName() << endl; + // << CurrentMeth->getName() << "\n"; BasicBlock *OrigBB = CI->getParent(); @@ -111,7 +112,7 @@ bool opt::InlineMethod(BasicBlock::iterator CIIt) { // code's values. This includes all of: Method arguments, instruction values, // constant pool entries, and basic blocks. // - map ValueMap; + std::map ValueMap; // Add the method arguments to the mapping: (start counting at 1 to skip the // method reference itself) -- cgit v1.2.3