aboutsummaryrefslogtreecommitdiff
path: root/lib/Bytecode/Reader
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Bytecode/Reader')
-rw-r--r--lib/Bytecode/Reader/ConstantReader.cpp4
-rw-r--r--lib/Bytecode/Reader/Parser.cpp6
-rw-r--r--lib/Bytecode/Reader/Parser.h4
-rw-r--r--lib/Bytecode/Reader/Reader.cpp4
-rw-r--r--lib/Bytecode/Reader/ReaderInternals.h4
5 files changed, 11 insertions, 11 deletions
diff --git a/lib/Bytecode/Reader/ConstantReader.cpp b/lib/Bytecode/Reader/ConstantReader.cpp
index 8691b26544..72d8caed67 100644
--- a/lib/Bytecode/Reader/ConstantReader.cpp
+++ b/lib/Bytecode/Reader/ConstantReader.cpp
@@ -24,7 +24,7 @@ const Type *BytecodeParser::parseTypeConstant(const unsigned char *&Buf,
unsigned PrimType = read_vbr_uint(Buf, EndBuf);
const Type *Val = 0;
- if ((Val = Type::getPrimitiveType((Type::PrimitiveID)PrimType)))
+ if ((Val = Type::getPrimitiveType((Type::TypeID)PrimType)))
return Val;
switch (PrimType) {
@@ -190,7 +190,7 @@ Constant *BytecodeParser::parseConstantValue(const unsigned char *&Buf,
// Ok, not an ConstantExpr. We now know how to read the given type...
const Type *Ty = getType(TypeID);
- switch (Ty->getPrimitiveID()) {
+ switch (Ty->getTypeID()) {
case Type::BoolTyID: {
unsigned Val = read_vbr_uint(Buf, EndBuf);
if (Val != 0 && Val != 1) throw std::string("Invalid boolean value read.");
diff --git a/lib/Bytecode/Reader/Parser.cpp b/lib/Bytecode/Reader/Parser.cpp
index a784811f86..c79318a02c 100644
--- a/lib/Bytecode/Reader/Parser.cpp
+++ b/lib/Bytecode/Reader/Parser.cpp
@@ -145,7 +145,7 @@ const Type *AbstractBytecodeParser::getType(unsigned ID) {
//cerr << "Looking up Type ID: " << ID << "\n";
if (ID < Type::FirstDerivedTyID)
- if (const Type *T = Type::getPrimitiveType((Type::PrimitiveID)ID))
+ if (const Type *T = Type::getPrimitiveType((Type::TypeID)ID))
return T; // Asked for a primitive type...
// Otherwise, derived types need offset...
@@ -467,7 +467,7 @@ const Type *AbstractBytecodeParser::ParseTypeConstant() {
unsigned PrimType = read_vbr_uint();
const Type *Val = 0;
- if ((Val = Type::getPrimitiveType((Type::PrimitiveID)PrimType)))
+ if ((Val = Type::getPrimitiveType((Type::TypeID)PrimType)))
return Val;
switch (PrimType) {
@@ -615,7 +615,7 @@ void AbstractBytecodeParser::ParseConstantValue(unsigned TypeID) {
// Ok, not an ConstantExpr. We now know how to read the given type...
const Type *Ty = getType(TypeID);
- switch (Ty->getPrimitiveID()) {
+ switch (Ty->getTypeID()) {
case Type::BoolTyID: {
unsigned Val = read_vbr_uint();
if (Val != 0 && Val != 1)
diff --git a/lib/Bytecode/Reader/Parser.h b/lib/Bytecode/Reader/Parser.h
index 7856fc5447..59023980b6 100644
--- a/lib/Bytecode/Reader/Parser.h
+++ b/lib/Bytecode/Reader/Parser.h
@@ -264,7 +264,7 @@ private:
/// fancy features are supported.
const Type *getGlobalTableType(unsigned Slot) {
if (Slot < Type::FirstDerivedTyID) {
- const Type *Ty = Type::getPrimitiveType((Type::PrimitiveID)Slot);
+ const Type *Ty = Type::getPrimitiveType((Type::TypeID)Slot);
assert(Ty && "Not a primitive type ID?");
return Ty;
}
@@ -276,7 +276,7 @@ private:
unsigned getGlobalTableTypeSlot(const Type *Ty) {
if (Ty->isPrimitiveType())
- return Ty->getPrimitiveID();
+ return Ty->getTypeID();
TypeListTy::iterator I = find(ModuleTypes.begin(),
ModuleTypes.end(), Ty);
if (I == ModuleTypes.end())
diff --git a/lib/Bytecode/Reader/Reader.cpp b/lib/Bytecode/Reader/Reader.cpp
index 2f0879ba39..2ca8a99f4c 100644
--- a/lib/Bytecode/Reader/Reader.cpp
+++ b/lib/Bytecode/Reader/Reader.cpp
@@ -25,7 +25,7 @@ using namespace llvm;
unsigned BytecodeParser::getTypeSlot(const Type *Ty) {
if (Ty->isPrimitiveType())
- return Ty->getPrimitiveID();
+ return Ty->getTypeID();
// Scan the compaction table for the type if needed.
if (CompactionTable.size() > Type::TypeTyID) {
@@ -56,7 +56,7 @@ const Type *BytecodeParser::getType(unsigned ID) {
//cerr << "Looking up Type ID: " << ID << "\n";
if (ID < Type::FirstDerivedTyID)
- if (const Type *T = Type::getPrimitiveType((Type::PrimitiveID)ID))
+ if (const Type *T = Type::getPrimitiveType((Type::TypeID)ID))
return T; // Asked for a primitive type...
// Otherwise, derived types need offset...
diff --git a/lib/Bytecode/Reader/ReaderInternals.h b/lib/Bytecode/Reader/ReaderInternals.h
index 9e0ffc2c36..36bf2f6f0e 100644
--- a/lib/Bytecode/Reader/ReaderInternals.h
+++ b/lib/Bytecode/Reader/ReaderInternals.h
@@ -173,7 +173,7 @@ private:
/// fancy features are supported.
const Type *getGlobalTableType(unsigned Slot) {
if (Slot < Type::FirstDerivedTyID) {
- const Type *Ty = Type::getPrimitiveType((Type::PrimitiveID)Slot);
+ const Type *Ty = Type::getPrimitiveType((Type::TypeID)Slot);
assert(Ty && "Not a primitive type ID?");
return Ty;
}
@@ -185,7 +185,7 @@ private:
unsigned getGlobalTableTypeSlot(const Type *Ty) {
if (Ty->isPrimitiveType())
- return Ty->getPrimitiveID();
+ return Ty->getTypeID();
TypeValuesListTy::iterator I = find(ModuleTypeValues.begin(),
ModuleTypeValues.end(), Ty);
if (I == ModuleTypeValues.end())