summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2013-02-05 07:31:55 +0000
committerEric Christopher <echristo@gmail.com>2013-02-05 07:31:55 +0000
commit7a2cdf798b3d3c83c979205bfe92b5562d034932 (patch)
treeccd5aa86283936d9af7d7bdc9110a5fec7f12d2e /llvm/lib/CodeGen
parent2ba5fcb7597a805937257a0ffd83d70c5497c26e (diff)
downloadbcm5719-llvm-7a2cdf798b3d3c83c979205bfe92b5562d034932.tar.gz
bcm5719-llvm-7a2cdf798b3d3c83c979205bfe92b5562d034932.zip
Add support for emitting a stub DW_AT_GNU_dwo_id as part of the
DWARF5 split dwarf proposal. llvm-svn: 174350
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 13ad353be24..6b19c5a7519 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -685,6 +685,11 @@ 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())
+ NewCU->addUInt(Die, dwarf::DW_AT_GNU_dwo_id, dwarf::DW_FORM_data8, 0);
+
if (useSplitDwarf() && !SkeletonCU)
SkeletonCU = constructSkeletonCU(N);
@@ -2450,7 +2455,8 @@ CompileUnit *DwarfDebug::constructSkeletonCU(const MDNode *N) {
StringRef FN = sys::path::filename(T);
NewCU->addLocalString(Die, dwarf::DW_AT_GNU_dwo_name, FN);
- // FIXME: We also need DW_AT_dwo_id.
+ // 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);
// FIXME: The addr base should be relative for each compile unit, however,
// this one is going to be 0 anyhow.
OpenPOWER on IntegriCloud