summaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DwarfDebug.h
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/DwarfDebug.h
parent9528b0e466ace36268abe9d011fffc67d831088c (diff)
downloadllvm-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/DwarfDebug.h')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h
index 8fe60c77be..e774c65394 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.h
@@ -341,6 +341,9 @@ class DwarfDebug {
// List of all labels used in the output.
std::vector<SymbolCU> Labels;
+ // Size of each symbol emitted (for those symbols that have a specific size).
+ DenseMap <const MCSymbol *, uint64_t> SymSize;
+
// Provides a unique id per text section.
typedef DenseMap<const MCSection *, SmallVector<SymbolCU, 8> > SectionMapType;
SectionMapType SectionMap;
@@ -682,6 +685,10 @@ public:
/// \brief Add a label so that arange data can be generated for it.
void addLabel(SymbolCU SCU) { Labels.push_back(SCU); }
+ /// \brief For symbols that have a size designated (e.g. common symbols),
+ /// this tracks that size.
+ void setSymbolSize(const MCSymbol *Sym, uint64_t Size) { SymSize[Sym] = Size;}
+
/// \brief Look up the source id with the given directory and source file
/// names. If none currently exists, create a new id and insert it in the
/// SourceIds map.