diff options
author | Dehao Chen <dehao@google.com> | 2015-11-11 18:08:18 +0000 |
---|---|---|
committer | Dehao Chen <dehao@google.com> | 2015-11-11 18:08:18 +0000 |
commit | 72fdf444b770fe8a7d355d5fe4793db664334302 (patch) | |
tree | b1c780d0331f718e2887f8992e07985b6627eb69 /llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | |
parent | d4870df9bf3ba1428eefda3a41d77ea684f278eb (diff) | |
download | bcm5719-llvm-72fdf444b770fe8a7d355d5fe4793db664334302.tar.gz bcm5719-llvm-72fdf444b770fe8a7d355d5fe4793db664334302.zip |
Emit discriminator for inlined callsites.
Summary: Inlined callsites need to be emitted in debug info so that sample profile can be annotated to the correct inlined instance.
Reviewers: dnovillo, dblaikie
Subscribers: dblaikie, llvm-commits
Differential Revision: http://reviews.llvm.org/D14511
llvm-svn: 252768
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index 687d6ae7441..21bdb0d0c25 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -439,6 +439,8 @@ DIE *DwarfCompileUnit::constructInlinedScopeDIE(LexicalScope *Scope) { addUInt(*ScopeDIE, dwarf::DW_AT_call_file, None, getOrCreateSourceID(IA->getFilename(), IA->getDirectory())); addUInt(*ScopeDIE, dwarf::DW_AT_call_line, None, IA->getLine()); + if (IA->getDiscriminator()) + addUInt(*ScopeDIE, dwarf::DW_AT_GNU_discriminator, None, IA->getDiscriminator()); // Add name to the name table, we do this here because we're guaranteed // to have concrete versions of our DW_TAG_inlined_subprogram nodes. |