[llvm-commits] CVS: llvm/lib/CodeGen/AsmPrinter.cpp
Anton Korobeynikov
asl at math.spbu.ru
Sun Apr 29 11:03:22 PDT 2007
Changes in directory llvm/lib/CodeGen:
AsmPrinter.cpp updated: 1.158 -> 1.159
---
Log message:
Implement review feedback
---
Diffs of the changes: (+3 -12)
AsmPrinter.cpp | 15 +++------------
1 files changed, 3 insertions(+), 12 deletions(-)
Index: llvm/lib/CodeGen/AsmPrinter.cpp
diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.158 llvm/lib/CodeGen/AsmPrinter.cpp:1.159
--- llvm/lib/CodeGen/AsmPrinter.cpp:1.158 Sat Apr 28 08:44:59 2007
+++ llvm/lib/CodeGen/AsmPrinter.cpp Sun Apr 29 13:02:48 2007
@@ -129,22 +129,13 @@
O << "\n";
for (Module::const_alias_iterator I = M.alias_begin(), E = M.alias_end();
I!=E; ++I) {
- const Constant *Aliasee = dyn_cast_or_null<Constant>(I->getAliasee());
- assert(Aliasee && "Aliasee cannot be null");
-
std::string Name = Mang->getValueName(I);
std::string Target;
- if (const GlobalValue *GV = dyn_cast<GlobalValue>(Aliasee))
+ if (const GlobalValue *GV = I->getAliasedGlobal())
Target = Mang->getValueName(GV);
- else {
- const ConstantExpr *CE = 0;
- if ((CE = dyn_cast<ConstantExpr>(Aliasee)) &&
- (CE->getOpcode() == Instruction::BitCast))
- Target = Mang->getValueName(CE->getOperand(0));
- else
- assert(0 && "Unsupported aliasee");
- }
+ else
+ assert(0 && "Unsupported aliasee");
if (I->hasExternalLinkage())
O << "\t.globl\t" << Name << "\n";
More information about the llvm-commits
mailing list