#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"
namespace llvm {
class Function;
-class TargetMachine;
class MachineRegisterInfo;
class MachineFrameInfo;
class MachineConstantPool;
class MachineJumpTableInfo;
+class TargetMachine;
template <>
-class ilist_traits<MachineBasicBlock>
+struct ilist_traits<MachineBasicBlock>
: public ilist_default_traits<MachineBasicBlock> {
mutable MachineBasicBlock Sentinel;
public:
typedef ilist<MachineBasicBlock> BasicBlockListType;
BasicBlockListType BasicBlocks;
+ // Tracks debug locations.
+ DebugLocTracker DebugLocInfo;
+
public:
MachineFunction(const Function *Fn, const TargetMachine &TM);
~MachineFunction();
/// DeleteMachineBasicBlock - Delete the given MachineBasicBlock.
///
void DeleteMachineBasicBlock(MachineBasicBlock *MBB);
+
+ //===--------------------------------------------------------------------===//
+ // Debug location.
+ //
+
+ /// getOrCreateDebugLocID - Look up the DebugLocTuple index with the given
+ /// source file, line, and column. If none currently exists, create add a new
+ /// new DebugLocTuple and insert it into the DebugIdMap.
+ unsigned getOrCreateDebugLocID(unsigned Src, unsigned Line, unsigned Col);
};
//===--------------------------------------------------------------------===//