Skip to content

Commit

Permalink
don't emit the symbol name twice for local bss and common
Browse files Browse the repository at this point in the history
symbols.  For example, don't emit:
        .comm   _i,4,2                  ## @i
                                        ## @i

instead emit:
        .comm   _i,4,2                  ## @i



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130192 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
lattner committed Apr 26, 2011
1 parent e88c724 commit bffc2b4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
6 changes: 0 additions & 6 deletions lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,12 +289,6 @@ void AsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) {
if (GVKind.isCommon() || GVKind.isBSSLocal()) {
if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, avoid it.

if (isVerbose()) {
WriteAsOperand(OutStreamer.GetCommentOS(), GV,
/*PrintType=*/false, GV->getParent());
OutStreamer.GetCommentOS() << '\n';
}

// Handle common symbols.
if (GVKind.isCommon()) {
unsigned Align = 1 << AlignLog;
Expand Down
2 changes: 1 addition & 1 deletion test/CodeGen/ARM/2010-12-15-elf-lcomm.ll
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@STRIDE = internal global i32 8

; ASM: .type array00,%object @ @array00
; ASM-NEXT: .lcomm array00,80 @ @array00
; ASM-NEXT: .lcomm array00,80
; ASM-NEXT: .type _MergedGlobals,%object @ @_MergedGlobals


Expand Down

0 comments on commit bffc2b4

Please sign in to comment.