From e9bb2df410f7a22decad9a883f7139d5857c1520 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 3 Dec 2001 22:26:30 +0000 Subject: 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 --- lib/Bytecode/Writer/ConstantWriter.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'lib/Bytecode/Writer/ConstantWriter.cpp') diff --git a/lib/Bytecode/Writer/ConstantWriter.cpp b/lib/Bytecode/Writer/ConstantWriter.cpp index 8beb132579..835ef9850b 100644 --- a/lib/Bytecode/Writer/ConstantWriter.cpp +++ b/lib/Bytecode/Writer/ConstantWriter.cpp @@ -10,7 +10,7 @@ //===----------------------------------------------------------------------===// #include "WriterInternals.h" -#include "llvm/ConstPoolVals.h" +#include "llvm/ConstantVals.h" #include "llvm/SymbolTable.h" #include "llvm/DerivedTypes.h" @@ -93,10 +93,10 @@ void BytecodeWriter::outputType(const Type *T) { } } -bool BytecodeWriter::outputConstant(const ConstPoolVal *CPV) { +bool BytecodeWriter::outputConstant(const Constant *CPV) { switch (CPV->getType()->getPrimitiveID()) { case Type::BoolTyID: // Boolean Types - if (cast(CPV)->getValue()) + if (cast(CPV)->getValue()) output_vbr((unsigned)1, Out); else output_vbr((unsigned)0, Out); @@ -106,22 +106,22 @@ bool BytecodeWriter::outputConstant(const ConstPoolVal *CPV) { case Type::UShortTyID: case Type::UIntTyID: case Type::ULongTyID: - output_vbr(cast(CPV)->getValue(), Out); + output_vbr(cast(CPV)->getValue(), Out); break; case Type::SByteTyID: // Signed integer types... case Type::ShortTyID: case Type::IntTyID: case Type::LongTyID: - output_vbr(cast(CPV)->getValue(), Out); + output_vbr(cast(CPV)->getValue(), Out); break; case Type::TypeTyID: // Serialize type type - assert(0 && "Types should not be in the ConstPool!"); + assert(0 && "Types should not be in the Constant!"); break; case Type::ArrayTyID: { - const ConstPoolArray *CPA = cast(CPV); + const ConstantArray *CPA = cast(CPV); unsigned size = CPA->getValues().size(); if (!((const ArrayType *)CPA->getType())->isSized()) output_vbr(size, Out); // Not for sized arrays!!! @@ -135,7 +135,7 @@ bool BytecodeWriter::outputConstant(const ConstPoolVal *CPV) { } case Type::StructTyID: { - const ConstPoolStruct *CPS = cast(CPV); + const ConstantStruct *CPS = cast(CPV); const vector &Vals = CPS->getValues(); for (unsigned i = 0; i < Vals.size(); ++i) { @@ -147,28 +147,28 @@ bool BytecodeWriter::outputConstant(const ConstPoolVal *CPV) { } case Type::PointerTyID: { - const ConstPoolPointer *CPP = cast(CPV); - if (isa(CPP)) { + const ConstantPointer *CPP = cast(CPV); + if (isa(CPP)) { output_vbr((unsigned)0, Out); - } else if (const ConstPoolPointerRef *CPR = - dyn_cast(CPP)) { + } else if (const ConstantPointerRef *CPR = + dyn_cast(CPP)) { output_vbr((unsigned)1, Out); int Slot = Table.getValSlot((Value*)CPR->getValue()); assert(Slot != -1 && "Global used but not available!!"); output_vbr((unsigned)Slot, Out); } else { - assert(0 && "Unknown ConstPoolPointer Subclass!"); + assert(0 && "Unknown ConstantPointer Subclass!"); } break; } case Type::FloatTyID: { // Floating point types... - float Tmp = (float)cast(CPV)->getValue(); + float Tmp = (float)cast(CPV)->getValue(); output_data(&Tmp, &Tmp+1, Out); break; } case Type::DoubleTyID: { - double Tmp = cast(CPV)->getValue(); + double Tmp = cast(CPV)->getValue(); output_data(&Tmp, &Tmp+1, Out); break; } -- cgit v1.2.3