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 /include/llvm/CodeGen/MachineFrameInfo.h | |
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 'include/llvm/CodeGen/MachineFrameInfo.h')
-rw-r--r-- | include/llvm/CodeGen/MachineFrameInfo.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineFrameInfo.h b/include/llvm/CodeGen/MachineFrameInfo.h index d6810bf4e5..baeb47c47d 100644 --- a/include/llvm/CodeGen/MachineFrameInfo.h +++ b/include/llvm/CodeGen/MachineFrameInfo.h @@ -44,6 +44,7 @@ namespace llvm { class TargetData; class TargetRegisterClass; class Type; +class MachineDebugInfo; class MachineFunction; class MachineFrameInfo { @@ -106,12 +107,21 @@ class MachineFrameInfo { /// insertion. /// unsigned MaxCallFrameSize; + + /// DebugInfo - This field is set (via setMachineDebugInfo) by a debug info + /// consumer (ex. DwarfWriter) to indicate that frame layout information + /// should be acquired. Typically, it's the responsibility of the target's + /// MRegisterInfo prologue/epilogue emitting code to inform MachineDebugInfo + /// of frame layouts. + MachineDebugInfo *DebugInfo; + public: MachineFrameInfo() { NumFixedObjects = StackSize = MaxAlignment = 0; HasVarSizedObjects = false; HasCalls = false; MaxCallFrameSize = 0; + DebugInfo = 0; } /// hasStackObjects - Return true if there are any stack objects in this @@ -230,6 +240,14 @@ public: return Objects.size()-NumFixedObjects-1; } + /// getMachineDebugInfo - Used by a prologue/epilogue emitter (MRegisterInfo) + /// to provide frame layout information. + MachineDebugInfo *getMachineDebugInfo() const { return DebugInfo; } + + /// setMachineDebugInfo - Used by a debug consumer (DwarfWriter) to indicate + /// that frame layout information should be gathered. + void setMachineDebugInfo(MachineDebugInfo *DI) { DebugInfo = DI; } + /// print - Used by the MachineFunction printer to print information about /// stack objects. Implemented in MachineFunction.cpp /// |