}
string ConstPoolFP::getStrValue() const {
- assert(0 && "FP Constants Not implemented yet!!!!!!!!!!!");
- return "% FP Constants NI!" /* + dtostr(Val)*/;
+ return ftostr(Val);
}
string ConstPoolType::getStrValue() const {
return false; // These can't be represented as floating point!
// TODO: Figure out how to test if a double can be cast to a float!
- /*
case Type::FloatTyID:
+ /*
return (Val <= UINT8_MAX);
*/
case Type::DoubleTyID:
GetElementPtrInst::GetElementPtrInst(Value *Ptr,
const vector<ConstPoolVal*> &Idx,
const string &Name = "")
- : MemAccessInst(PointerType::getPointerType(getIndexedType(Ptr->getType(), Idx, true)), GetElementPtr, Name) {
+ : MemAccessInst(PointerType::getPointerType(getIndexedType(Ptr->getType(),
+ Idx, true)),
+ GetElementPtr, Name) {
assert(getIndexedType(Ptr->getType(), Idx, true) && "gep operands invalid!");
Operands.reserve(1+Idx.size());
Operands.push_back(Use(Ptr, this));