Foundation for call frame information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27491 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Laskey
2006-04-07 16:34:46 +00:00
parent 38ab6d887c
commit 4188699f80
21 changed files with 359 additions and 65 deletions

View File

@@ -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;
}
}