diff options
author | Paul Robinson <paul_robinson@playstation.sony.com> | 2014-01-31 20:39:19 +0000 |
---|---|---|
committer | Paul Robinson <paul_robinson@playstation.sony.com> | 2014-01-31 20:39:19 +0000 |
commit | c2c98e78842b364df35a34639f217339e0bc5118 (patch) | |
tree | d36c979e3e7bbe4852d440abf64391b33a3525be | |
parent | 5ff4b203e6e1aeb450ad18ffd7693499018d14e6 (diff) | |
download | llvm-c2c98e78842b364df35a34639f217339e0bc5118.tar.gz llvm-c2c98e78842b364df35a34639f217339e0bc5118.tar.bz2 llvm-c2c98e78842b364df35a34639f217339e0bc5118.tar.xz |
If we're not producing DWARF accel tables, don't waste memory
keeping track of those entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200572 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfUnit.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/lib/CodeGen/AsmPrinter/DwarfUnit.cpp index 9478453b4c..0723eb85a2 100644 --- a/lib/CodeGen/AsmPrinter/DwarfUnit.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfUnit.cpp @@ -1016,18 +1016,21 @@ void DwarfUnit::addType(DIE *Entity, DIType Ty, dwarf::Attribute Attribute) { // to reference is in the string table. We do this since the names we // add may not only be identical to the names in the DIE. void DwarfUnit::addAccelName(StringRef Name, const DIE *Die) { + if (!DD->useDwarfAccelTables()) return; DU->getStringPoolEntry(Name); std::vector<const DIE *> &DIEs = AccelNames[Name]; DIEs.push_back(Die); } void DwarfUnit::addAccelObjC(StringRef Name, const DIE *Die) { + if (!DD->useDwarfAccelTables()) return; DU->getStringPoolEntry(Name); std::vector<const DIE *> &DIEs = AccelObjC[Name]; DIEs.push_back(Die); } void DwarfUnit::addAccelNamespace(StringRef Name, const DIE *Die) { + if (!DD->useDwarfAccelTables()) return; DU->getStringPoolEntry(Name); std::vector<const DIE *> &DIEs = AccelNamespace[Name]; DIEs.push_back(Die); @@ -1035,6 +1038,7 @@ void DwarfUnit::addAccelNamespace(StringRef Name, const DIE *Die) { void DwarfUnit::addAccelType(StringRef Name, std::pair<const DIE *, unsigned> Die) { + if (!DD->useDwarfAccelTables()) return; DU->getStringPoolEntry(Name); std::vector<std::pair<const DIE *, unsigned> > &DIEs = AccelTypes[Name]; DIEs.push_back(Die); |