From 91dac6d570bca39ab11bffb88613e4246171529a Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 25 Jan 2010 07:52:13 +0000 Subject: emit the .size directive for global variables on ELF through mcstreamer. llvm-svn: 94416 --- llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen') 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(); } -- cgit v1.2.3