[llvm-commits] CVS: llvm/lib/Bytecode/Reader/ConstantReader.cpp Reader.cpp ReaderInternals.h
Chris Lattner
lattner at cs.uiuc.edu
Thu Jun 17 13:25:09 PDT 2004
Changes in directory llvm/lib/Bytecode/Reader:
ConstantReader.cpp updated: 1.76 -> 1.77
Reader.cpp updated: 1.106 -> 1.107
ReaderInternals.h updated: 1.79 -> 1.80
---
Log message:
Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()
---
Diffs of the changes: (+6 -6)
Index: llvm/lib/Bytecode/Reader/ConstantReader.cpp
diff -u llvm/lib/Bytecode/Reader/ConstantReader.cpp:1.76 llvm/lib/Bytecode/Reader/ConstantReader.cpp:1.77
--- llvm/lib/Bytecode/Reader/ConstantReader.cpp:1.76 Sun Apr 4 20:27:22 2004
+++ llvm/lib/Bytecode/Reader/ConstantReader.cpp Thu Jun 17 13:17:58 2004
@@ -24,7 +24,7 @@
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 @@
// 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.");
Index: llvm/lib/Bytecode/Reader/Reader.cpp
diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.106 llvm/lib/Bytecode/Reader/Reader.cpp:1.107
--- llvm/lib/Bytecode/Reader/Reader.cpp:1.106 Sun Apr 4 20:27:22 2004
+++ llvm/lib/Bytecode/Reader/Reader.cpp Thu Jun 17 13:17:58 2004
@@ -25,7 +25,7 @@
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 @@
//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...
Index: llvm/lib/Bytecode/Reader/ReaderInternals.h
diff -u llvm/lib/Bytecode/Reader/ReaderInternals.h:1.79 llvm/lib/Bytecode/Reader/ReaderInternals.h:1.80
--- llvm/lib/Bytecode/Reader/ReaderInternals.h:1.79 Sun Apr 4 20:27:22 2004
+++ llvm/lib/Bytecode/Reader/ReaderInternals.h Thu Jun 17 13:17:58 2004
@@ -173,7 +173,7 @@
/// 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 @@
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())
More information about the llvm-commits
mailing list