aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
diff options
context:
space:
mode:
authorRichard Mitton <richard@codersnotes.com>2013-09-23 17:56:20 +0000
committerRichard Mitton <richard@codersnotes.com>2013-09-23 17:56:20 +0000
commiteb46def978a60fd705cca3037feff5573122b404 (patch)
tree73466a34e49ec135896bbd648f52920e5e436847 /lib/CodeGen/AsmPrinter/AsmPrinter.cpp
parent9528b0e466ace36268abe9d011fffc67d831088c (diff)
downloadexternal_llvm-eb46def978a60fd705cca3037feff5573122b404.zip
external_llvm-eb46def978a60fd705cca3037feff5573122b404.tar.gz
external_llvm-eb46def978a60fd705cca3037feff5573122b404.tar.bz2
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.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index e662377..de08b77 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.