summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-25 18:33:40 +0000
committerChris Lattner <sabre@nondot.org>2010-01-25 18:33:40 +0000
commitbc696445e17308d64e579589642cac29dcbac87f (patch)
tree4b47e6171922bea8f77b047ce40752813871507c /llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
parentbc8f63853105b3712c665a80b17b77f1d27fa141 (diff)
downloadbcm5719-llvm-bc696445e17308d64e579589642cac29dcbac87f.tar.gz
bcm5719-llvm-bc696445e17308d64e579589642cac29dcbac87f.zip
emit ELF .type directives through MCStreamer instead of doing it textually.
llvm-svn: 94436
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index ecf18dad6b3..8935445ade5 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -156,13 +156,8 @@ void AsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) {
MCSymbol *GVSym = GetGlobalValueSymbol(GV);
printVisibility(GVSym, GV->getVisibility());
- if (MAI->hasDotTypeDotSizeDirective()) {
- O << "\t.type\t" << *GVSym;
- if (MAI->getCommentString()[0] != '@')
- O << ",@object\n";
- else
- O << ",%object\n";
- }
+ if (MAI->hasDotTypeDotSizeDirective())
+ OutStreamer.EmitSymbolAttribute(GVSym, MCSA_ELF_TypeObject);
SectionKind GVKind = TargetLoweringObjectFile::getKindForGlobal(GV, TM);
OpenPOWER on IntegriCloud