Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14201 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp
index a4383e0..253e954 100644
--- a/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -181,7 +181,7 @@
       GenericValue GV = getConstantValue(Op);
 
       // Handle cast of pointer to pointer...
-      if (Op->getType()->getPrimitiveID() == C->getType()->getPrimitiveID())
+      if (Op->getType()->getTypeID() == C->getType()->getTypeID())
         return GV;
 
       // Handle a cast of pointer to any integral type...
@@ -190,7 +190,7 @@
         
       // Handle cast of integer to a pointer...
       if (isa<PointerType>(C->getType()) && Op->getType()->isIntegral())
-        switch (Op->getType()->getPrimitiveID()) {
+        switch (Op->getType()->getTypeID()) {
         case Type::BoolTyID:    return PTOGV((void*)(uintptr_t)GV.BoolVal);
         case Type::SByteTyID:   return PTOGV((void*)( intptr_t)GV.SByteVal);
         case Type::UByteTyID:   return PTOGV((void*)(uintptr_t)GV.UByteVal);
@@ -221,7 +221,7 @@
     abort();
   }
   
-  switch (C->getType()->getPrimitiveID()) {
+  switch (C->getType()->getTypeID()) {
 #define GET_CONST_VAL(TY, CLASS) \
   case Type::TY##TyID: Result.TY##Val = cast<CLASS>(C)->getValue(); break
     GET_CONST_VAL(Bool   , ConstantBool);
@@ -263,7 +263,7 @@
 void ExecutionEngine::StoreValueToMemory(GenericValue Val, GenericValue *Ptr,
                                          const Type *Ty) {
   if (getTargetData().isLittleEndian()) {
-    switch (Ty->getPrimitiveID()) {
+    switch (Ty->getTypeID()) {
     case Type::BoolTyID:
     case Type::UByteTyID:
     case Type::SByteTyID:   Ptr->Untyped[0] = Val.UByteVal; break;
@@ -296,7 +296,7 @@
       std::cout << "Cannot store value of type " << Ty << "!\n";
     }
   } else {
-    switch (Ty->getPrimitiveID()) {
+    switch (Ty->getTypeID()) {
     case Type::BoolTyID:
     case Type::UByteTyID:
     case Type::SByteTyID:   Ptr->Untyped[0] = Val.UByteVal; break;
@@ -337,7 +337,7 @@
                                                   const Type *Ty) {
   GenericValue Result;
   if (getTargetData().isLittleEndian()) {
-    switch (Ty->getPrimitiveID()) {
+    switch (Ty->getTypeID()) {
     case Type::BoolTyID:
     case Type::UByteTyID:
     case Type::SByteTyID:   Result.UByteVal = Ptr->Untyped[0]; break;
@@ -371,7 +371,7 @@
       abort();
     }
   } else {
-    switch (Ty->getPrimitiveID()) {
+    switch (Ty->getTypeID()) {
     case Type::BoolTyID:
     case Type::UByteTyID:
     case Type::SByteTyID:   Result.UByteVal = Ptr->Untyped[0]; break;
@@ -422,7 +422,7 @@
     return;
   }
 
-  switch (Init->getType()->getPrimitiveID()) {
+  switch (Init->getType()->getTypeID()) {
   case Type::ArrayTyID: {
     const ConstantArray *CPA = cast<ConstantArray>(Init);
     const std::vector<Use> &Val = CPA->getValues();
diff --git a/lib/ExecutionEngine/Interpreter/Execution.cpp b/lib/ExecutionEngine/Interpreter/Execution.cpp
index 769d0e6..3348ab4 100644
--- a/lib/ExecutionEngine/Interpreter/Execution.cpp
+++ b/lib/ExecutionEngine/Interpreter/Execution.cpp
@@ -182,7 +182,7 @@
 static GenericValue executeAddInst(GenericValue Src1, GenericValue Src2, 
 				   const Type *Ty) {
   GenericValue Dest;
-  switch (Ty->getPrimitiveID()) {
+  switch (Ty->getTypeID()) {
     IMPLEMENT_BINARY_OPERATOR(+, UByte);
     IMPLEMENT_BINARY_OPERATOR(+, SByte);
     IMPLEMENT_BINARY_OPERATOR(+, UShort);
@@ -203,7 +203,7 @@
 static GenericValue executeSubInst(GenericValue Src1, GenericValue Src2, 
 				   const Type *Ty) {
   GenericValue Dest;
-  switch (Ty->getPrimitiveID()) {
+  switch (Ty->getTypeID()) {
     IMPLEMENT_BINARY_OPERATOR(-, UByte);
     IMPLEMENT_BINARY_OPERATOR(-, SByte);
     IMPLEMENT_BINARY_OPERATOR(-, UShort);
@@ -224,7 +224,7 @@
 static GenericValue executeMulInst(GenericValue Src1, GenericValue Src2, 
 				   const Type *Ty) {
   GenericValue Dest;
-  switch (Ty->getPrimitiveID()) {
+  switch (Ty->getTypeID()) {
     IMPLEMENT_BINARY_OPERATOR(*, UByte);
     IMPLEMENT_BINARY_OPERATOR(*, SByte);
     IMPLEMENT_BINARY_OPERATOR(*, UShort);
@@ -245,7 +245,7 @@
 static GenericValue executeDivInst(GenericValue Src1, GenericValue Src2, 
 				   const Type *Ty) {
   GenericValue Dest;
-  switch (Ty->getPrimitiveID()) {
+  switch (Ty->getTypeID()) {
     IMPLEMENT_BINARY_OPERATOR(/, UByte);
     IMPLEMENT_BINARY_OPERATOR(/, SByte);
     IMPLEMENT_BINARY_OPERATOR(/, UShort);
@@ -266,7 +266,7 @@
 static GenericValue executeRemInst(GenericValue Src1, GenericValue Src2, 
 				   const Type *Ty) {
   GenericValue Dest;
-  switch (Ty->getPrimitiveID()) {
+  switch (Ty->getTypeID()) {
     IMPLEMENT_BINARY_OPERATOR(%, UByte);
     IMPLEMENT_BINARY_OPERATOR(%, SByte);
     IMPLEMENT_BINARY_OPERATOR(%, UShort);
@@ -291,7 +291,7 @@
 static GenericValue executeAndInst(GenericValue Src1, GenericValue Src2, 
 				   const Type *Ty) {
   GenericValue Dest;
-  switch (Ty->getPrimitiveID()) {
+  switch (Ty->getTypeID()) {
     IMPLEMENT_BINARY_OPERATOR(&, Bool);
     IMPLEMENT_BINARY_OPERATOR(&, UByte);
     IMPLEMENT_BINARY_OPERATOR(&, SByte);
@@ -311,7 +311,7 @@
 static GenericValue executeOrInst(GenericValue Src1, GenericValue Src2, 
                                   const Type *Ty) {
   GenericValue Dest;
-  switch (Ty->getPrimitiveID()) {
+  switch (Ty->getTypeID()) {
     IMPLEMENT_BINARY_OPERATOR(|, Bool);
     IMPLEMENT_BINARY_OPERATOR(|, UByte);
     IMPLEMENT_BINARY_OPERATOR(|, SByte);
@@ -331,7 +331,7 @@
 static GenericValue executeXorInst(GenericValue Src1, GenericValue Src2, 
                                    const Type *Ty) {
   GenericValue Dest;
-  switch (Ty->getPrimitiveID()) {
+  switch (Ty->getTypeID()) {
     IMPLEMENT_BINARY_OPERATOR(^, Bool);
     IMPLEMENT_BINARY_OPERATOR(^, UByte);
     IMPLEMENT_BINARY_OPERATOR(^, SByte);
@@ -363,7 +363,7 @@
 static GenericValue executeSetEQInst(GenericValue Src1, GenericValue Src2, 
 				     const Type *Ty) {
   GenericValue Dest;
-  switch (Ty->getPrimitiveID()) {
+  switch (Ty->getTypeID()) {
     IMPLEMENT_SETCC(==, UByte);
     IMPLEMENT_SETCC(==, SByte);
     IMPLEMENT_SETCC(==, UShort);
@@ -385,7 +385,7 @@
 static GenericValue executeSetNEInst(GenericValue Src1, GenericValue Src2, 
 				     const Type *Ty) {
   GenericValue Dest;
-  switch (Ty->getPrimitiveID()) {
+  switch (Ty->getTypeID()) {
     IMPLEMENT_SETCC(!=, UByte);
     IMPLEMENT_SETCC(!=, SByte);
     IMPLEMENT_SETCC(!=, UShort);
@@ -408,7 +408,7 @@
 static GenericValue executeSetLEInst(GenericValue Src1, GenericValue Src2, 
 				     const Type *Ty) {
   GenericValue Dest;
-  switch (Ty->getPrimitiveID()) {
+  switch (Ty->getTypeID()) {
     IMPLEMENT_SETCC(<=, UByte);
     IMPLEMENT_SETCC(<=, SByte);
     IMPLEMENT_SETCC(<=, UShort);
@@ -430,7 +430,7 @@
 static GenericValue executeSetGEInst(GenericValue Src1, GenericValue Src2, 
 				     const Type *Ty) {
   GenericValue Dest;
-  switch (Ty->getPrimitiveID()) {
+  switch (Ty->getTypeID()) {
     IMPLEMENT_SETCC(>=, UByte);
     IMPLEMENT_SETCC(>=, SByte);
     IMPLEMENT_SETCC(>=, UShort);
@@ -452,7 +452,7 @@
 static GenericValue executeSetLTInst(GenericValue Src1, GenericValue Src2, 
 				     const Type *Ty) {
   GenericValue Dest;
-  switch (Ty->getPrimitiveID()) {
+  switch (Ty->getTypeID()) {
     IMPLEMENT_SETCC(<, UByte);
     IMPLEMENT_SETCC(<, SByte);
     IMPLEMENT_SETCC(<, UShort);
@@ -474,7 +474,7 @@
 static GenericValue executeSetGTInst(GenericValue Src1, GenericValue Src2, 
 				     const Type *Ty) {
   GenericValue Dest;
-  switch (Ty->getPrimitiveID()) {
+  switch (Ty->getTypeID()) {
     IMPLEMENT_SETCC(>, UByte);
     IMPLEMENT_SETCC(>, SByte);
     IMPLEMENT_SETCC(>, UShort);
@@ -739,7 +739,7 @@
       GenericValue IdxGV = getOperandValue(I.getOperand(), SF);
 
       uint64_t Idx;
-      switch (I.getOperand()->getType()->getPrimitiveID()) {
+      switch (I.getOperand()->getType()->getTypeID()) {
       default: assert(0 && "Illegal getelementptr index for sequential type!");
       case Type::SByteTyID:  Idx = IdxGV.SByteVal; break;
       case Type::ShortTyID:  Idx = IdxGV.ShortVal; break;
@@ -865,7 +865,7 @@
 static GenericValue executeShlInst(GenericValue Src1, GenericValue Src2,
                                    const Type *Ty) {
   GenericValue Dest;
-  switch (Ty->getPrimitiveID()) {
+  switch (Ty->getTypeID()) {
     IMPLEMENT_SHIFT(<<, UByte);
     IMPLEMENT_SHIFT(<<, SByte);
     IMPLEMENT_SHIFT(<<, UShort);
@@ -883,7 +883,7 @@
 static GenericValue executeShrInst(GenericValue Src1, GenericValue Src2,
                                    const Type *Ty) {
   GenericValue Dest;
-  switch (Ty->getPrimitiveID()) {
+  switch (Ty->getTypeID()) {
     IMPLEMENT_SHIFT(>>, UByte);
     IMPLEMENT_SHIFT(>>, SByte);
     IMPLEMENT_SHIFT(>>, UShort);
@@ -924,7 +924,7 @@
 
 #define IMPLEMENT_CAST_CASE_START(DESTTY, DESTCTY)    \
   case Type::DESTTY##TyID:                      \
-    switch (SrcTy->getPrimitiveID()) {          \
+    switch (SrcTy->getTypeID()) {          \
       IMPLEMENT_CAST(DESTTY, DESTCTY, Bool);    \
       IMPLEMENT_CAST(DESTTY, DESTCTY, UByte);   \
       IMPLEMENT_CAST(DESTTY, DESTCTY, SByte);   \
@@ -956,7 +956,7 @@
   const Type *SrcTy = SrcVal->getType();
   GenericValue Dest, Src = getOperandValue(SrcVal, SF);
 
-  switch (Ty->getPrimitiveID()) {
+  switch (Ty->getTypeID()) {
     IMPLEMENT_CAST_CASE(UByte  , (unsigned char));
     IMPLEMENT_CAST_CASE(SByte  , (  signed char));
     IMPLEMENT_CAST_CASE(UShort , (unsigned short));
@@ -1007,7 +1007,7 @@
   GenericValue Src = ECStack[VAList.UIntPairVal.first]
 	.VarArgs[VAList.UIntPairVal.second];
   const Type *Ty = I.getType();
-  switch (Ty->getPrimitiveID()) {
+  switch (Ty->getTypeID()) {
     IMPLEMENT_VAARG(UByte);
     IMPLEMENT_VAARG(SByte);
     IMPLEMENT_VAARG(UShort);
diff --git a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
index 2299874..83da755 100644
--- a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
+++ b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
@@ -38,7 +38,7 @@
 static Interpreter *TheInterpreter;
 
 static char getTypeID(const Type *Ty) {
-  switch (Ty->getPrimitiveID()) {
+  switch (Ty->getTypeID()) {
   case Type::VoidTyID:    return 'V';
   case Type::BoolTyID:    return 'o';
   case Type::UByteTyID:   return 'B';