std::string MSILWriter::getValueName(const Value* V) {
std::string Name;
- if (const GlobalValue *GV = cast<GlobalValue>(V))
+ if (const GlobalValue *GV = dyn_cast<GlobalValue>(V))
Name = Mang->getMangledName(GV);
else {
unsigned &No = AnonValueNumbers[V];
std::string MSILWriter::getLabelName(const Value* V) {
std::string Name;
- if (const GlobalValue *GV = cast<GlobalValue>(V))
+ if (const GlobalValue *GV = dyn_cast<GlobalValue>(V))
Name = Mang->getMangledName(GV);
else {
unsigned &No = AnonValueNumbers[V];