summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bytecode/Reader/ConstantReader.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
commit7f74a56e2436c40b18a672ad7d58727cd6832329 (patch)
tree6a4683a53f7eb71b8a3425008ef21268c2b2c8fd /llvm/lib/Bytecode/Reader/ConstantReader.cpp
parent850d4f6af1a0e9de3fa6e10afb04e3738fcc5d67 (diff)
downloadbcm5719-llvm-7f74a56e2436c40b18a672ad7d58727cd6832329.tar.gz
bcm5719-llvm-7f74a56e2436c40b18a672ad7d58727cd6832329.zip
Changes to build successfully with GCC 3.02
llvm-svn: 1503
Diffstat (limited to 'llvm/lib/Bytecode/Reader/ConstantReader.cpp')
-rw-r--r--llvm/lib/Bytecode/Reader/ConstantReader.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/llvm/lib/Bytecode/Reader/ConstantReader.cpp b/llvm/lib/Bytecode/Reader/ConstantReader.cpp
index 78da567f012..d5833dbeed5 100644
--- a/llvm/lib/Bytecode/Reader/ConstantReader.cpp
+++ b/llvm/lib/Bytecode/Reader/ConstantReader.cpp
@@ -14,8 +14,9 @@
#include "llvm/ConstantVals.h"
#include "llvm/GlobalVariable.h"
#include <algorithm>
-
-
+#include <iostream>
+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<const Type*> Params;
+ std::vector<const Type*> 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<const Type*> Elements;
+ std::vector<const Type*> 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<const ArrayType>(Ty);
unsigned NumElements = AT->getNumElements();
- vector<Constant*> Elements;
+ std::vector<Constant*> 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<StructType>(Ty);
const StructType::ElementTypes &ET = ST->getElementTypes();
- vector<Constant *> Elements;
+ std::vector<Constant *> Elements;
for (unsigned i = 0; i < ET.size(); ++i) {
unsigned Slot;
if (read_vbr(Buf, EndBuf, Slot)) return failure(true);
OpenPOWER on IntegriCloud