Add a default debug location object to the Machine Function. It's used to emit a...
authorBill Wendling <isanbard@gmail.com>
Fri, 20 Feb 2009 00:42:52 +0000 (00:42 +0000)
committerBill Wendling <isanbard@gmail.com>
Fri, 20 Feb 2009 00:42:52 +0000 (00:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65091 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineFunction.h

index a039e23399b65c806bd411c915c588700e45a00a..689e4357b1d7819b3894946e12e466b84c6a6c95 100644 (file)
@@ -95,6 +95,10 @@ class MachineFunction : private Annotation {
   typedef ilist<MachineBasicBlock> BasicBlockListType;
   BasicBlockListType BasicBlocks;
 
+  // Default debug location. Used to print out the debug label at the beginning
+  // of a function.
+  DebugLoc DefaultDebugLoc;
+
   // Tracks debug locations.
   DebugLocTracker DebugLocInfo;
 
@@ -319,6 +323,14 @@ public:
 
   /// getDebugLocTuple - Get the DebugLocTuple for a given DebugLoc object.
   DebugLocTuple getDebugLocTuple(DebugLoc DL) const;
+
+  /// getDefaultDebugLoc - Get the default debug location for the machine
+  /// function.
+  DebugLoc getDefaultDebugLoc() const { return DefaultDebugLoc; }
+
+  /// setDefaultDebugLoc - Get the default debug location for the machine
+  /// function.
+  void setDefaultDebugLoc(DebugLoc DL) { DefaultDebugLoc = DL; }
 };
 
 //===--------------------------------------------------------------------===//