aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/TargetData.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-12-03 22:26:30 +0000
committerChris Lattner <sabre@nondot.org>2001-12-03 22:26:30 +0000
commite9bb2df410f7a22decad9a883f7139d5857c1520 (patch)
treef6ca07fb5f5de1df8a2572142a707f56bf25c6e6 /lib/Target/TargetData.cpp
parent9ef18310beaabe7abfa712a3c761036ea2d17caa (diff)
Rename ConstPoolVal -> Constant
Rename ConstPool* -> Constant* Rename ConstPoolVals.h -> ConstantVals.h git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1407 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/TargetData.cpp')
-rw-r--r--lib/Target/TargetData.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp
index 02d18c21a5..b11ef0438a 100644
--- a/lib/Target/TargetData.cpp
+++ b/lib/Target/TargetData.cpp
@@ -12,7 +12,7 @@
#include "llvm/Target/TargetData.h"
#include "llvm/DerivedTypes.h"
-#include "llvm/ConstPoolVals.h"
+#include "llvm/ConstantVals.h"
static inline void getTypeInfo(const Type *Ty, const TargetData *TD,
unsigned &Size, unsigned char &Alignment);
@@ -146,7 +146,7 @@ unsigned char TargetData::getTypeAlignment(const Type *Ty) const {
}
unsigned TargetData::getIndexedOffset(const Type *ptrTy,
- const vector<ConstPoolVal*> &Idx) const {
+ const vector<Constant*> &Idx) const {
const PointerType *PtrTy = cast<const PointerType>(ptrTy);
unsigned Result = 0;
@@ -156,7 +156,7 @@ unsigned TargetData::getIndexedOffset(const Type *ptrTy,
for (unsigned CurIDX = 0; CurIDX < Idx.size(); ++CurIDX) {
if (const StructType *STy = dyn_cast<const StructType>(Ty)) {
assert(Idx[CurIDX]->getType() == Type::UByteTy && "Illegal struct idx");
- unsigned FieldNo = ((ConstPoolUInt*)Idx[CurIDX])->getValue();
+ unsigned FieldNo = cast<ConstantUInt>(Idx[CurIDX])->getValue();
// Get structure layout information...
const StructLayout *Layout = getStructLayout(STy);