diff options
author | Eric Christopher <echristo@gmail.com> | 2013-02-05 07:31:55 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2013-02-05 07:31:55 +0000 |
commit | 208cc6f48975320da1a71cf7f7eff497f4f43b75 (patch) | |
tree | 7b0ad2417f1ab4959fffded3c7eb3e0b8cdfd22e /lib/CodeGen | |
parent | ae510f3936f2510cebff86ea38536b30fdf2a30c (diff) | |
download | external_llvm-208cc6f48975320da1a71cf7f7eff497f4f43b75.zip external_llvm-208cc6f48975320da1a71cf7f7eff497f4f43b75.tar.gz external_llvm-208cc6f48975320da1a71cf7f7eff497f4f43b75.tar.bz2 |
Add support for emitting a stub DW_AT_GNU_dwo_id as part of the
DWARF5 split dwarf proposal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174350 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 13ad353..6b19c5a 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/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. |