summaryrefslogtreecommitdiff
path: root/lib/Transforms/IPO/InlineSimple.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-01-20 22:54:45 +0000
committerChris Lattner <sabre@nondot.org>2002-01-20 22:54:45 +0000
commit697954c15da58bd8b186dbafdedd8b06db770201 (patch)
treee119a71f09b5c2513c8c270161ae2a858c6f3b96 /lib/Transforms/IPO/InlineSimple.cpp
parent13c4659220bc78a0a3529f4d9e57546e898088e3 (diff)
downloadllvm-697954c15da58bd8b186dbafdedd8b06db770201.tar.gz
llvm-697954c15da58bd8b186dbafdedd8b06db770201.tar.bz2
llvm-697954c15da58bd8b186dbafdedd8b06db770201.tar.xz
Changes to build successfully with GCC 3.02
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1503 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/InlineSimple.cpp')
-rw-r--r--lib/Transforms/IPO/InlineSimple.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/Transforms/IPO/InlineSimple.cpp b/lib/Transforms/IPO/InlineSimple.cpp
index 40b98bd67d..9d86c86895 100644
--- a/lib/Transforms/IPO/InlineSimple.cpp
+++ b/lib/Transforms/IPO/InlineSimple.cpp
@@ -27,6 +27,8 @@
#include "llvm/iOther.h"
#include <algorithm>
#include <map>
+#include <iostream>
+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<const Value *, Value*> &ValueMap) {
+ std::map<const Value *, Value*> &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<const Value *, Value*> ValueMap;
+ std::map<const Value *, Value*> ValueMap;
// Add the method arguments to the mapping: (start counting at 1 to skip the
// method reference itself)