summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
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
commit91dac6d570bca39ab11bffb88613e4246171529a (patch)
tree4c61ba288e644b86b87a58356cb29df4a0cf0446 /llvm/lib/CodeGen
parent9b83727cfee6b763ea6c16c2096ad7b041395785 (diff)
downloadbcm5719-llvm-91dac6d570bca39ab11bffb88613e4246171529a.tar.gz
bcm5719-llvm-91dac6d570bca39ab11bffb88613e4246171529a.zip
emit the .size directive for global variables on ELF through
mcstreamer. llvm-svn: 94416
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index f4d886492c5..eab2d9d6e48 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/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();
}
OpenPOWER on IntegriCloud