aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineModuleInfo.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2011-07-18 20:57:22 +0000
committerEvan Cheng <evan.cheng@apple.com>2011-07-18 20:57:22 +0000
commitd60fa58ba1a65d9f1888c66f637a6a887eaf2bd5 (patch)
tree528f76d2eeb4a71312f21346e1851040eaf73deb /llvm/lib/CodeGen/MachineModuleInfo.cpp
parent4dc76f243864fe34028a08f261c4d97f6256c583 (diff)
downloadllvm-d60fa58ba1a65d9f1888c66f637a6a887eaf2bd5.zip
llvm-d60fa58ba1a65d9f1888c66f637a6a887eaf2bd5.tar.gz
llvm-d60fa58ba1a65d9f1888c66f637a6a887eaf2bd5.tar.bz2
Sink getDwarfRegNum, getLLVMRegNum, getSEHRegNum from TargetRegisterInfo down
to MCRegisterInfo. Also initialize the mapping at construction time. This patch eliminate TargetRegisterInfo from TargetAsmInfo. It's another step towards fixing the layering violation. llvm-svn: 135424
Diffstat (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineModuleInfo.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineModuleInfo.cpp b/llvm/lib/CodeGen/MachineModuleInfo.cpp
index fadc594..2b1c385 100644
--- a/llvm/lib/CodeGen/MachineModuleInfo.cpp
+++ b/llvm/lib/CodeGen/MachineModuleInfo.cpp
@@ -254,8 +254,9 @@ void MMIAddrLabelMapCallbackPtr::allUsesReplacedWith(Value *V2) {
//===----------------------------------------------------------------------===//
MachineModuleInfo::MachineModuleInfo(const MCAsmInfo &MAI,
+ const MCRegisterInfo &MRI,
const TargetAsmInfo *TAI)
-: ImmutablePass(ID), Context(MAI, TAI),
+ : ImmutablePass(ID), Context(MAI, MRI, TAI),
ObjFileMMI(0),
CurCallSite(0), CallsEHReturn(0), CallsUnwindInit(0), DbgInfoAvailable(false),
CallsExternalVAFunctionWithFloatingPointArguments(false) {
@@ -267,7 +268,7 @@ MachineModuleInfo::MachineModuleInfo(const MCAsmInfo &MAI,
}
MachineModuleInfo::MachineModuleInfo()
-: ImmutablePass(ID), Context(*(MCAsmInfo*)0, NULL) {
+ : ImmutablePass(ID), Context(*(MCAsmInfo*)0, *(MCRegisterInfo*)0, NULL) {
assert(0 && "This MachineModuleInfo constructor should never be called, MMI "
"should always be explicitly constructed by LLVMTargetMachine");
abort();