diff options
Diffstat (limited to 'include/llvm/CodeGen/MachineFunction.h')
-rw-r--r-- | include/llvm/CodeGen/MachineFunction.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h index 0074f1a..ea6a384 100644 --- a/include/llvm/CodeGen/MachineFunction.h +++ b/include/llvm/CodeGen/MachineFunction.h @@ -111,6 +111,9 @@ class MachineFunction : private Annotation { // Tracks debug locations. DebugLocTracker DebugLocInfo; + // The alignment of the function. + unsigned Alignment; + public: MachineFunction(const Function *Fn, const TargetMachine &TM); ~MachineFunction(); @@ -148,6 +151,14 @@ public: MachineConstantPool *getConstantPool() { return ConstantPool; } const MachineConstantPool *getConstantPool() const { return ConstantPool; } + /// getAlignment - Return the alignment (log2, not bytes) of the function. + /// + unsigned getAlignment() const { return Alignment; } + + /// setAlignment - Set the alignment (log2, not bytes) of the function. + /// + void setAlignment(unsigned A) { Alignment = A; } + /// MachineFunctionInfo - Keep track of various per-function pieces of /// information for backends that would like to do so. /// @@ -345,6 +356,9 @@ public: /// setDefaultDebugLoc - Get the default debug location for the machine /// function. void setDefaultDebugLoc(DebugLoc DL) { DefaultDebugLoc = DL; } + + /// getDebugLocInfo - Get the debug info location tracker. + DebugLocTracker &getDebugLocInfo() { return DebugLocInfo; } }; //===--------------------------------------------------------------------===// |