- case 0: return string("#") + itostr(Num);
- case 1: return Name;
- case 4: return string("\"") + Name + string("\"");
- case 5: return ftostr(ConstPoolFP);
- default: return string("%") + itostr(ConstPool64);
+ case LocalID : return '%' + utostr(Num);
+ case GlobalID : return '@' + utostr(Num);
+ case LocalName : return *Name;
+ case GlobalName : return *Name;
+ case ConstFPVal : return ftostr(*ConstPoolFP);
+ case ConstNullVal : return "null";
+ case ConstUndefVal : return "undef";
+ case ConstZeroVal : return "zeroinitializer";
+ case ConstUIntVal :
+ case ConstSIntVal : return std::string("%") + itostr(ConstPool64);
+ case ConstantVal:
+ if (ConstantValue == ConstantInt::getTrue()) return "true";
+ if (ConstantValue == ConstantInt::getFalse()) return "false";
+ return "<constant expression>";
+ default:
+ assert(0 && "Unknown value!");
+ abort();
+ return "";