summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2013-02-05 07:32:03 +0000
committerEric Christopher <echristo@gmail.com>2013-02-05 07:32:03 +0000
commit411e6745573931fc3d48c76adfc11323d9d0f058 (patch)
treebc951e69819dcb5f1ec193da129e6eb75061f038 /llvm/lib/CodeGen
parent6a421a944d44f31270327303e5fc63eac3d32a4c (diff)
downloadbcm5719-llvm-411e6745573931fc3d48c76adfc11323d9d0f058.tar.gz
bcm5719-llvm-411e6745573931fc3d48c76adfc11323d9d0f058.zip
Construct a skeleton cu for each compile unit in the module, not just
for the first compile unit. llvm-svn: 174352
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 6b19c5a7519..967c149b53d 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -686,12 +686,12 @@ CompileUnit *DwarfDebug::constructCompileUnit(const MDNode *N) {
if (!FirstCU)
FirstCU = NewCU;
- // This should be a unique identifier when we want to build .dwp files.
- if (useSplitDwarf())
+ if (useSplitDwarf()) {
+ // This should be a unique identifier when we want to build .dwp files.
NewCU->addUInt(Die, dwarf::DW_AT_GNU_dwo_id, dwarf::DW_FORM_data8, 0);
-
- if (useSplitDwarf() && !SkeletonCU)
- SkeletonCU = constructSkeletonCU(N);
+ // Now construct the skeleton CU associated.
+ constructSkeletonCU(N);
+ }
InfoHolder.addUnit(NewCU);
@@ -2477,6 +2477,9 @@ CompileUnit *DwarfDebug::constructSkeletonCU(const MDNode *N) {
if (!CompilationDir.empty())
NewCU->addLocalString(Die, dwarf::DW_AT_comp_dir, CompilationDir);
+ if (!SkeletonCU)
+ SkeletonCU = NewCU;
+
SkeletonHolder.addUnit(NewCU);
return NewCU;
OpenPOWER on IntegriCloud