diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-05-20 22:57:17 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-05-20 22:57:17 +0000 |
commit | a3437647dc6996499db4823c31242184c93e6e2e (patch) | |
tree | b11e9216b210aa292c44b188250195ef8292d4b3 /include/llvm/CodeGen/MachineFunction.h | |
parent | b60182f1b0218e0196c78f1cfeda2cf223a47146 (diff) |
Introduce DebugScope which gets embedded into the machine instructions' DebugLoc.
DebugScope refers to a debug region, function or block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72191 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineFunction.h')
-rw-r--r-- | include/llvm/CodeGen/MachineFunction.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h index a110e5846a..d1744a0790 100644 --- a/include/llvm/CodeGen/MachineFunction.h +++ b/include/llvm/CodeGen/MachineFunction.h @@ -111,6 +111,8 @@ class MachineFunction : private Annotation { // Tracks debug locations. DebugLocTracker DebugLocInfo; + std::vector<DebugScopeInfo> DbgScopeInfos; + public: MachineFunction(const Function *Fn, const TargetMachine &TM); ~MachineFunction(); @@ -332,7 +334,7 @@ public: /// getOrCreateDebugLocID - Look up the DebugLocTuple index with the given /// source file, line, and column. If none currently exists, create a new /// DebugLocTuple, and insert it into the DebugIdMap. - unsigned getOrCreateDebugLocID(GlobalVariable *CompileUnit, + unsigned getOrCreateDebugLocID(GlobalVariable *CompileUnit, DebugScope Scope, unsigned Line, unsigned Col); /// getDebugLocTuple - Get the DebugLocTuple for a given DebugLoc object. @@ -345,6 +347,12 @@ public: /// setDefaultDebugLoc - Get the default debug location for the machine /// function. void setDefaultDebugLoc(DebugLoc DL) { DefaultDebugLoc = DL; } + + /// CreateDebugScope - Create a new debug scope. + DebugScope CreateDebugScope(GlobalVariable *ScopeGV, DebugScope Parent); + + /// getDebugScopeInfo - Get the DebugScopeInfo for a given DebugScope object. + const DebugScopeInfo &getDebugScopeInfo(DebugScope DS) const; }; //===--------------------------------------------------------------------===// |