aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2011-11-07 22:11:16 +0000
committerEric Christopher <echristo@apple.com>2011-11-07 22:11:16 +0000
commit56c2b109f73f895b591d2303128c8adcf0bc2c3d (patch)
tree19b1e15d1bf42c42c477be222aa6a6bfe955b2ef /lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
parent32dc4d9cd76795f43478e80eec9b1e073adf0f98 (diff)
Add all completed and named types to the dwarf type accelerator tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144027 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
index cb80bd810e..660992a294 100644
--- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
@@ -634,6 +634,12 @@ void CompileUnit::addType(DIE *Entity, DIType Ty) {
// If this is a complete composite type then include it in the
// list of global types.
addGlobalType(Ty);
+
+ // If this is a named finished type then include it in the list of types
+ // for the accelerator tables.
+ if (!Ty.getName().empty() && !Ty.isForwardDecl())
+ if (DIEEntry *Entry = getDIEEntry(Ty))
+ AccelTypes[Ty.getName()] = Entry->getEntry();
}
/// addGlobalType - Add a new global type to the compile unit.