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 | 2d7298c362e3ec5f16ebeddf2e68de0ebeb1ff9a (patch) | |
tree | 3ead77af5d3ba6edcc69872a3ebce4ce8ba0dc90 /llvm/lib/CodeGen/MachineDebugInfo.cpp | |
parent | e690a93c64effabe71dc4450e0913508a8440dd8 (diff) | |
download | bcm5719-llvm-2d7298c362e3ec5f16ebeddf2e68de0ebeb1ff9a.tar.gz bcm5719-llvm-2d7298c362e3ec5f16ebeddf2e68de0ebeb1ff9a.zip |
Foundation for call frame information.
llvm-svn: 27491
Diffstat (limited to 'llvm/lib/CodeGen/MachineDebugInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineDebugInfo.cpp | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/llvm/lib/CodeGen/MachineDebugInfo.cpp b/llvm/lib/CodeGen/MachineDebugInfo.cpp index 9876e652a83..2e7e8c0d9f1 100644 --- a/llvm/lib/CodeGen/MachineDebugInfo.cpp +++ b/llvm/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; - } -} - |