diff options
author | Richard Mitton <richard@codersnotes.com> | 2013-09-23 17:56:20 +0000 |
---|---|---|
committer | Richard Mitton <richard@codersnotes.com> | 2013-09-23 17:56:20 +0000 |
commit | eb46def978a60fd705cca3037feff5573122b404 (patch) | |
tree | 73466a34e49ec135896bbd648f52920e5e436847 /lib/CodeGen/AsmPrinter/AsmPrinter.cpp | |
parent | 9528b0e466ace36268abe9d011fffc67d831088c (diff) | |
download | llvm-eb46def978a60fd705cca3037feff5573122b404.tar.gz llvm-eb46def978a60fd705cca3037feff5573122b404.tar.bz2 llvm-eb46def978a60fd705cca3037feff5573122b404.tar.xz |
Fixed debug_aranges handling for common symbols.
The size of common symbols is now tracked correctly, so they can be listed in the arange section without needing knowledge of other following symbols.
.comm (and .lcomm) do not indicate to the system assembler any particular section to use, so we have to treat them as having no section.
Test case update to account for this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191210 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index e66237706b..de08b77012 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -292,6 +292,9 @@ void AsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) { // sections and expected to be contiguous (e.g. ObjC metadata). unsigned AlignLog = getGVAlignmentLog2(GV, *TD); + if (DD) + DD->setSymbolSize(GVSym, Size); + // Handle common and BSS local symbols (.lcomm). if (GVKind.isCommon() || GVKind.isBSSLocal()) { if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, avoid it. |