aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-25 07:52:13 +0000
committerChris Lattner <sabre@nondot.org>2010-01-25 07:52:13 +0000
commit99328add833807f12a4950c7de29fb2a5df04703 (patch)
tree64d49704d26bb97c93e0a1b64a2cdaffa85f6d7d /lib/CodeGen/AsmPrinter/AsmPrinter.cpp
parent5c78034bc80b7de88842c5455a9a3d1402defee7 (diff)
downloadexternal_llvm-99328add833807f12a4950c7de29fb2a5df04703.tar.gz
external_llvm-99328add833807f12a4950c7de29fb2a5df04703.tar.bz2
external_llvm-99328add833807f12a4950c7de29fb2a5df04703.zip
emit the .size directive for global variables on ELF through
mcstreamer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94416 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/AsmPrinter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index f4d886492c..eab2d9d6e4 100644
--- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -275,7 +275,7 @@ void AsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) {
EmitGlobalConstant(GV->getInitializer());
if (MAI->hasDotTypeDotSizeDirective())
- O << "\t.size\t" << *GVSym << ", " << Size << '\n';
+ OutStreamer.EmitELFSize(GVSym, MCConstantExpr::Create(Size, OutContext));
OutStreamer.AddBlankLine();
}