aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2012-01-06 04:35:23 +0000
committerEric Christopher <echristo@apple.com>2012-01-06 04:35:23 +0000
commitc36145f19c1e164f7d630b813e9970600d8f2976 (patch)
tree4fecb1e41d03e3621ef56ccba6182f17c712fc38 /lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
parent3b205175ea417349ab96f3525d730e005e12c0f9 (diff)
As part of the ongoing work in finalizing the accelerator tables, extend
the debug type accelerator tables to contain the tag and a flag stating whether or not a compound type is a complete type. rdar://10652330 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147651 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
index f43a5bf842..e499d2c8bf 100644
--- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
@@ -13,6 +13,7 @@
#define DEBUG_TYPE "dwarfdebug"
+#include "DwarfAccelTable.h"
#include "DwarfCompileUnit.h"
#include "DwarfDebug.h"
#include "llvm/Constants.h"
@@ -608,8 +609,20 @@ DIE *CompileUnit::getOrCreateTypeDIE(const MDNode *TyNode) {
}
// 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())
- addAccelType(Ty.getName(), TyDIE);
+ if (!Ty.getName().empty() && !Ty.isForwardDecl()) {
+ bool IsImplementation = 0;
+ if (Ty.isCompositeType()) {
+ DICompositeType CT(Ty);
+ IsImplementation = (CT.getRunTimeLang() == 0) ||
+ CT.isObjcClassComplete();;
+ }
+
+ addAccelType(Ty.getName(),
+ std::make_pair(TyDIE,
+ (IsImplementation ?
+ DwarfAccelTable::eTypeFlagClassIsImplementation :
+ 0)));
+ }
addToContextOwner(TyDIE, Ty.getContext());
return TyDIE;