summaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-05-16 13:02:18 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-05-16 13:02:18 +0000
commit21cfedee056a1e0789bbe6cafa23549d0ff16f24 (patch)
treeec91a01c03827b063b817116a403ec039408b40d /lib/CodeGen/AsmPrinter
parent2b3ef615cab1134cda3c41d448b470124705d734 (diff)
downloadllvm-21cfedee056a1e0789bbe6cafa23549d0ff16f24.tar.gz
llvm-21cfedee056a1e0789bbe6cafa23549d0ff16f24.tar.bz2
llvm-21cfedee056a1e0789bbe6cafa23549d0ff16f24.tar.xz
Revert "Implement global merge optimization for global variables."
This reverts commit r208934. The patch depends on aliases to GEPs with non zero offsets. That is not supported and fairly broken. The good news is that GlobalAlias is being redesigned and will have support for offsets, so this patch should be a nice match for it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208978 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter')
-rw-r--r--lib/CodeGen/AsmPrinter/AsmPrinter.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 0c4865f2f2..37a2c3220c 100644
--- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -946,11 +946,8 @@ bool AsmPrinter::doFinalization(Module &M) {
EmitVisibility(Name, Alias.getVisibility());
// Emit the directives as assignments aka .set:
- const MCExpr *Expr = MCSymbolRefExpr::Create(Target, OutContext);
- if (uint64_t Offset = Alias.calculateOffset(*TM.getDataLayout()))
- Expr = MCBinaryExpr::CreateAdd(Expr,
- MCConstantExpr::Create(Offset, OutContext), OutContext);
- OutStreamer.EmitAssignment(Name, Expr);
+ OutStreamer.EmitAssignment(Name,
+ MCSymbolRefExpr::Create(Target, OutContext));
}
}