Cleanup
authorAnton Korobeynikov <asl@math.spbu.ru>
Wed, 24 Sep 2008 22:17:27 +0000 (22:17 +0000)
committerAnton Korobeynikov <asl@math.spbu.ru>
Wed, 24 Sep 2008 22:17:27 +0000 (22:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56578 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/DarwinTargetAsmInfo.cpp
lib/Target/ELFTargetAsmInfo.cpp

index 81a33420717d2e2df4e46010c7ddf6fe6791d6b4..0ae304e2d491867013436f967c163df17b454286 100644 (file)
@@ -128,7 +128,7 @@ DarwinTargetAsmInfo::MergeableStringSection(const GlobalVariable *GV) const {
 
 const Section*
 DarwinTargetAsmInfo::MergeableConstSection(const GlobalVariable *GV) const {
-  Constant *C = cast<GlobalVariable>(GV)->getInitializer();
+  Constant *C = GV->getInitializer();
 
   return MergeableConstSection(C->getType());
 }
index b9e9812575975bef3272ad43b76efd44c624859b..7c9e4546d252f9f388260044c9a38122fec8be90 100644 (file)
@@ -96,7 +96,7 @@ ELFTargetAsmInfo::SelectSectionForMachineConst(const Type *Ty) const {
 
 const Section*
 ELFTargetAsmInfo::MergeableConstSection(const GlobalVariable *GV) const {
-  Constant *C = cast<GlobalVariable>(GV)->getInitializer();
+  Constant *C = GV->getInitializer();
   return MergeableConstSection(C->getType());
 }