fix some casts that I improperly refactored, patch by Artur Pietrek!

llvm-svn: 75894
This commit is contained in:
Chris Lattner 2009-07-16 04:34:33 +00:00
parent b825dd3a31
commit efeba80e74
1 changed files with 2 additions and 2 deletions
llvm/lib/Target/MSIL

View File

@ -235,7 +235,7 @@ bool MSILWriter::isZeroValue(const Value* V) {
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];
@ -262,7 +262,7 @@ std::string MSILWriter::getLabelName(const std::string& Name) {
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];