From 697954c15da58bd8b186dbafdedd8b06db770201 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1503 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Bytecode/Reader/ConstantReader.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'lib/Bytecode/Reader/ConstantReader.cpp') diff --git a/lib/Bytecode/Reader/ConstantReader.cpp b/lib/Bytecode/Reader/ConstantReader.cpp index 78da567f01..d5833dbeed 100644 --- a/lib/Bytecode/Reader/ConstantReader.cpp +++ b/lib/Bytecode/Reader/ConstantReader.cpp @@ -14,8 +14,9 @@ #include "llvm/ConstantVals.h" #include "llvm/GlobalVariable.h" #include - - +#include +using std::make_pair; +using std::cerr; const Type *BytecodeParser::parseTypeConstant(const uchar *&Buf, const uchar *EndBuf) { @@ -36,7 +37,7 @@ const Type *BytecodeParser::parseTypeConstant(const uchar *&Buf, unsigned NumParams; if (read_vbr(Buf, EndBuf, NumParams)) return failure(Val); - vector Params; + std::vector Params; while (NumParams--) { if (read_vbr(Buf, EndBuf, Typ)) return failure(Val); const Type *Ty = getType(Typ); @@ -59,12 +60,12 @@ const Type *BytecodeParser::parseTypeConstant(const uchar *&Buf, if (read_vbr(Buf, EndBuf, NumElements)) return failure(Val); BCR_TRACE(5, "Array Type Constant #" << ElTyp << " size=" - << NumElements << endl); + << NumElements << "\n"); return ArrayType::get(ElementType, NumElements); } case Type::StructTyID: { unsigned Typ; - vector Elements; + std::vector Elements; if (read_vbr(Buf, EndBuf, Typ)) return failure(Val); while (Typ) { // List is terminated by void/0 typeid @@ -80,7 +81,7 @@ const Type *BytecodeParser::parseTypeConstant(const uchar *&Buf, case Type::PointerTyID: { unsigned ElTyp; if (read_vbr(Buf, EndBuf, ElTyp)) return failure(Val); - BCR_TRACE(5, "Pointer Type Constant #" << (ElTyp-14) << endl); + BCR_TRACE(5, "Pointer Type Constant #" << (ElTyp-14) << "\n"); const Type *ElementType = getType(ElTyp); if (ElementType == 0) return failure(Val); return PointerType::get(ElementType); @@ -241,7 +242,7 @@ bool BytecodeParser::parseConstantValue(const uchar *&Buf, const uchar *EndBuf, const ArrayType *AT = cast(Ty); unsigned NumElements = AT->getNumElements(); - vector Elements; + std::vector Elements; while (NumElements--) { // Read all of the elements of the constant. unsigned Slot; if (read_vbr(Buf, EndBuf, Slot)) return failure(true); @@ -257,7 +258,7 @@ bool BytecodeParser::parseConstantValue(const uchar *&Buf, const uchar *EndBuf, const StructType *ST = cast(Ty); const StructType::ElementTypes &ET = ST->getElementTypes(); - vector Elements; + std::vector Elements; for (unsigned i = 0; i < ET.size(); ++i) { unsigned Slot; if (read_vbr(Buf, EndBuf, Slot)) return failure(true); -- cgit v1.2.3