diff options
author | Jim Laskey <jlaskey@mac.com> | 2006-04-07 16:34:46 +0000 |
---|---|---|
committer | Jim Laskey <jlaskey@mac.com> | 2006-04-07 16:34:46 +0000 |
commit | 4188699f80c233a20b6ddc61570a8a8c1804cb85 (patch) | |
tree | a711460fdce84b3c1fdd9c1dcce8be21fef48786 /lib/CodeGen/MachineDebugInfo.cpp | |
parent | 38ab6d887c660c7e2fe08707e8f982ab451fb224 (diff) |
Foundation for call frame information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27491 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineDebugInfo.cpp')
-rw-r--r-- | lib/CodeGen/MachineDebugInfo.cpp | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/lib/CodeGen/MachineDebugInfo.cpp b/lib/CodeGen/MachineDebugInfo.cpp index 9876e652a8..2e7e8c0d9f 100644 --- a/lib/CodeGen/MachineDebugInfo.cpp +++ b/lib/CodeGen/MachineDebugInfo.cpp @@ -10,6 +10,7 @@ #include "llvm/CodeGen/MachineDebugInfo.h" #include "llvm/Constants.h" +#include "llvm/CodeGen/MachineLocation.h" #include "llvm/DerivedTypes.h" #include "llvm/GlobalVariable.h" #include "llvm/Intrinsics.h" @@ -1424,9 +1425,8 @@ MachineDebugInfo::MachineDebugInfo() , LabelID(0) , ScopeMap() , RootScope(NULL) -{ - -} +, FrameMoves() +{} MachineDebugInfo::~MachineDebugInfo() { } @@ -1443,6 +1443,27 @@ bool MachineDebugInfo::doFinalization() { return false; } +/// BeginFunction - Begin gathering function debug information. +/// +void MachineDebugInfo::BeginFunction(MachineFunction *MF) { + // Coming soon. +} + +/// MachineDebugInfo::EndFunction - Discard function debug information. +/// +void MachineDebugInfo::EndFunction() { + // Clean up scope information. + if (RootScope) { + delete RootScope; + ScopeMap.clear(); + RootScope = NULL; + } + + // Clean up frame info. + for (unsigned i = 0, N = FrameMoves.size(); i < N; ++i) delete FrameMoves[i]; + FrameMoves.clear(); +} + /// getDescFor - Convert a Value to a debug information descriptor. /// // FIXME - use new Value type when available. @@ -1565,14 +1586,4 @@ DebugScope *MachineDebugInfo::getOrCreateScope(DebugInfoDesc *ScopeDesc) { return Slot; } -/// ClearScopes - Delete the scope and variable info after a function is -/// completed. -void MachineDebugInfo::ClearScopes() { - if (RootScope) { - delete RootScope; - ScopeMap.clear(); - RootScope = NULL; - } -} - |