diff options
author | Jim Laskey <jlaskey@mac.com> | 2006-01-05 01:25:28 +0000 |
---|---|---|
committer | Jim Laskey <jlaskey@mac.com> | 2006-01-05 01:25:28 +0000 |
commit | abf6d1784b2d4bbcb7d20ab64881f77d755059f6 (patch) | |
tree | 922ed43eb59093df7e5fa40d3b814177ed364d86 /include/llvm/CodeGen | |
parent | d90eb7fb2435e2abedb4694edc44fa45642edbe9 (diff) |
Added initial support for DEBUG_LABEL allowing debug specific labels to be
inserted in the code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25104 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r-- | include/llvm/CodeGen/DwarfWriter.h | 5 | ||||
-rw-r--r-- | include/llvm/CodeGen/MachineDebugInfo.h | 7 | ||||
-rw-r--r-- | include/llvm/CodeGen/SelectionDAGNodes.h | 13 |
3 files changed, 19 insertions, 6 deletions
diff --git a/include/llvm/CodeGen/DwarfWriter.h b/include/llvm/CodeGen/DwarfWriter.h index 11e5623b0d..1a7c5a5666 100644 --- a/include/llvm/CodeGen/DwarfWriter.h +++ b/include/llvm/CodeGen/DwarfWriter.h @@ -550,8 +550,9 @@ namespace llvm { /// void EmitInitial() const; - /// ShouldEmitDwarf - Determine if dwarf declarations should be made. - /// + /// ShouldEmitDwarf - Returns true if dwarf declarations should be made. + /// When called it also checks to see if debug info is newly available. if + /// so the initial dwarf headers are emitted. bool ShouldEmitDwarf(); /// BeginModule - Emit all dwarf sections that should come prior to the diff --git a/include/llvm/CodeGen/MachineDebugInfo.h b/include/llvm/CodeGen/MachineDebugInfo.h index c728418a89..039bdbc0d5 100644 --- a/include/llvm/CodeGen/MachineDebugInfo.h +++ b/include/llvm/CodeGen/MachineDebugInfo.h @@ -52,6 +52,13 @@ public: /// unsigned getNextUniqueID() { return UniqueID++; } + /// RecordLabel - Records location information and associates it with a + /// debug label. Returns unique label id. + unsigned RecordLabel(unsigned Line, unsigned Col, unsigned SrcFile) { + // FIXME - actually record. + return getNextUniqueID(); + } + bool doInitialization(); bool doFinalization(); diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index 800ad3932b..124da2e6cd 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -355,12 +355,17 @@ namespace ISD { LOCATION, // DEBUG_LOC - This node is used to represent source line information - // embedded in the code. It takes token chain as input, then a line number, - // then a column then a file id (provided by MachineDebugInfo), then a - // unique id (provided by MachineDebugInfo for label gen). It produces a - // token chain as output. + // embedded in the code. It takes a token chain as input, then a line + // number, then a column then a file id (provided by MachineDebugInfo.) It + // produces a token chain as output. DEBUG_LOC, + // DEBUG_LABEL - This node is used to mark a location in the code where a + // label should be generated for use by the debug information. It takes a + // token chain as input, the a unique id (provided by MachineDebugInfo.) It + // produces a token chain as output. + DEBUG_LABEL, + // BUILTIN_OP_END - This must be the last enum value in this list. BUILTIN_OP_END, }; |