From c6a057b04db506152c98355b51ba15d82a15b90a Mon Sep 17 00:00:00 2001 From: Jeff Cohen Date: Tue, 2 May 2006 03:46:13 +0000 Subject: De-virtualize EmitZeroes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28046 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'lib/CodeGen') diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp index 9e94f7a52f..aad02327c6 100644 --- a/lib/CodeGen/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter.cpp @@ -37,6 +37,7 @@ AsmPrinter::AsmPrinter(std::ostream &o, TargetMachine &tm) InlineAsmStart("#APP\n\t"), InlineAsmEnd("\t#NO_APP\n"), ZeroDirective("\t.zero\t"), + ZeroDirectiveSuffix(0), AsciiDirective("\t.ascii\t"), AscizDirective("\t.asciz\t"), Data8bitsDirective("\t.byte\t"), @@ -240,9 +241,12 @@ void AsmPrinter::EmitAlignment(unsigned NumBits, const GlobalValue *GV) const { /// void AsmPrinter::EmitZeros(uint64_t NumZeros) const { if (NumZeros) { - if (ZeroDirective) - O << ZeroDirective << NumZeros << "\n"; - else { + if (ZeroDirective) { + O << ZeroDirective << NumZeros; + if (ZeroDirectiveSuffix) + O << ZeroDirectiveSuffix; + O << "\n"; + } else { for (; NumZeros; --NumZeros) O << Data8bitsDirective << "0\n"; } -- cgit v1.2.3-18-g5258