aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineFunction.h
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-01-26 07:41:49 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-01-26 07:41:49 +0000
commitd0adbb5b7da2d1238fdf1a30734a001a0103aab0 (patch)
tree2a019e89810a2aad71780c5280dbf187b8f36285 /include/llvm/CodeGen/MachineFunction.h
parentd5362986da35310b68452f4437dffad071b7fe47 (diff)
Add data structure to define and track debug location during codegen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63008 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineFunction.h')
-rw-r--r--include/llvm/CodeGen/MachineFunction.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h
index 835c8a37c5..1397b84677 100644
--- a/include/llvm/CodeGen/MachineFunction.h
+++ b/include/llvm/CodeGen/MachineFunction.h
@@ -19,6 +19,7 @@
#define LLVM_CODEGEN_MACHINEFUNCTION_H
#include "llvm/ADT/ilist.h"
+#include "llvm/CodeGen/DebugLoc.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/Support/Annotation.h"
#include "llvm/Support/Allocator.h"
@@ -27,11 +28,11 @@
namespace llvm {
class Function;
-class TargetMachine;
class MachineRegisterInfo;
class MachineFrameInfo;
class MachineConstantPool;
class MachineJumpTableInfo;
+class TargetMachine;
template <>
struct ilist_traits<MachineBasicBlock>
@@ -94,6 +95,9 @@ class MachineFunction : private Annotation {
typedef ilist<MachineBasicBlock> BasicBlockListType;
BasicBlockListType BasicBlocks;
+ // Tracks debug locations.
+ DebugLocTracker DebugLocInfo;
+
public:
MachineFunction(const Function *Fn, const TargetMachine &TM);
~MachineFunction();
@@ -302,6 +306,15 @@ public:
/// DeleteMachineBasicBlock - Delete the given MachineBasicBlock.
///
void DeleteMachineBasicBlock(MachineBasicBlock *MBB);
+
+ //===--------------------------------------------------------------------===//
+ // Debug location.
+ //
+
+ /// lookUpDebugLocId - Look up the DebugLocTuple index with the given
+ /// filename, line, and column. It may add a new filename and / or
+ /// a new DebugLocTuple.
+ unsigned lookUpDebugLocId(const char *Filename, unsigned Line, unsigned Col);
};
//===--------------------------------------------------------------------===//