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
This commit is contained in:
Chris Lattner
2002-01-20 22:54:45 +00:00
parent 13c4659220
commit 697954c15d
230 changed files with 2373 additions and 2445 deletions

View File

@@ -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)