diff options
author | Devang Patel <dpatel@apple.com> | 2009-04-11 00:16:47 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-04-11 00:16:47 +0000 |
commit | 2057532679fc1045cfeb38b477ac9e749e6b1dd8 (patch) | |
tree | 12744ff1819cbe961dd7bb2cd639bb1003045508 /include | |
parent | dbf1e2b08b534c32743aa7ea8ef7d6f5cee6234b (diff) | |
download | external_llvm-2057532679fc1045cfeb38b477ac9e749e6b1dd8.zip external_llvm-2057532679fc1045cfeb38b477ac9e749e6b1dd8.tar.gz external_llvm-2057532679fc1045cfeb38b477ac9e749e6b1dd8.tar.bz2 |
Keep track of inlined functions and their locations. This information is collected when nested llvm.dbg.func.start intrinsics are seen. (Right now, inliner removes nested llvm.dbg.func.start intrinisics during inlining.)
Create debug_inlined dwarf section using these information. This info is used by gdb, at least on Darwin, to enable better experience debugging inlined functions. See DwarfWriter.cpp for more information on structure of debug_inlined section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68847 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/CodeGen/DwarfWriter.h | 7 | ||||
-rw-r--r-- | include/llvm/Target/TargetAsmInfo.h | 9 |
2 files changed, 15 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/DwarfWriter.h b/include/llvm/CodeGen/DwarfWriter.h index 8e82718..e7d9266 100644 --- a/include/llvm/CodeGen/DwarfWriter.h +++ b/include/llvm/CodeGen/DwarfWriter.h @@ -94,6 +94,9 @@ public: /// RecordRegionStart - Indicate the start of a region. unsigned RecordRegionStart(GlobalVariable *V); + /// RecordRegionStart - Indicate the start of a region. + unsigned RecordRegionStart(GlobalVariable *V, unsigned ID); + /// RecordRegionEnd - Indicate the end of a region. unsigned RecordRegionEnd(GlobalVariable *V); @@ -107,6 +110,10 @@ public: /// ShouldEmitDwarfDebug - Returns true if Dwarf debugging declarations should /// be emitted. bool ShouldEmitDwarfDebug() const; + + //// RecordInlineInfo - Global variable GV is inlined at the location marked + //// by LabelID label. + void RecordInlineInfo(GlobalVariable *GV, unsigned LabelID); }; diff --git a/include/llvm/Target/TargetAsmInfo.h b/include/llvm/Target/TargetAsmInfo.h index b871009..9f44596 100644 --- a/include/llvm/Target/TargetAsmInfo.h +++ b/include/llvm/Target/TargetAsmInfo.h @@ -506,7 +506,11 @@ namespace llvm { /// DwarfPubTypesSection - Section directive for Dwarf info. /// const char *DwarfPubTypesSection; // Defaults to ".debug_pubtypes". - + + /// DwarfDebugInlineSection - Section directive for inline info. + /// + const char *DwarfDebugInlineSection; // Defaults to ".debug_inlined" + /// DwarfStrSection - Section directive for Dwarf info. /// const char *DwarfStrSection; // Defaults to ".debug_str". @@ -880,6 +884,9 @@ namespace llvm { const char *getDwarfPubTypesSection() const { return DwarfPubTypesSection; } + const char *getDwarfDebugInlineSection() const { + return DwarfDebugInlineSection; + } const char *getDwarfStrSection() const { return DwarfStrSection; } |