From: Chris Lattner Date: Thu, 16 Jul 2009 04:34:33 +0000 (+0000) Subject: fix some casts that I improperly refactored, patch by Artur Pietrek! X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=c2b443a698493d3f2fe6ce2d8e7798a659eb3aae;p=oota-llvm.git fix some casts that I improperly refactored, patch by Artur Pietrek! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75894 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/MSIL/MSILWriter.cpp b/lib/Target/MSIL/MSILWriter.cpp index 8bd3c7bc22d..dbfcdb7207b 100644 --- a/lib/Target/MSIL/MSILWriter.cpp +++ b/lib/Target/MSIL/MSILWriter.cpp @@ -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(V)) + if (const GlobalValue *GV = dyn_cast(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(V)) + if (const GlobalValue *GV = dyn_cast(V)) Name = Mang->getMangledName(GV); else { unsigned &No = AnonValueNumbers[V];