From e468f88b26f55e3f42a4870c2756c0184e8a4eb4 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 13 Mar 2010 20:55:24 +0000 Subject: rearrange MCContext ownership. Before LLVMTargetMachine created it and passing off ownership to AsmPrinter. Now MachineModuleInfo creates it and owns it by value. This allows us to use MCSymbols more consistently throughout the rest of the code generator, and simplifies a bit of code. This also allows MachineFunction to keep an MCContext reference handy, and cleans up the TargetRegistry interfaces for AsmPrinters. llvm-svn: 98450 --- llvm/lib/CodeGen/MachineFunction.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen/MachineFunction.cpp') diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index cecfa156264..37f3d22630d 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -85,8 +85,8 @@ void ilist_traits::deleteNode(MachineBasicBlock *MBB) { } MachineFunction::MachineFunction(Function *F, const TargetMachine &TM, - unsigned FunctionNum) - : Fn(F), Target(TM) { + unsigned FunctionNum, MCContext &ctx) + : Fn(F), Target(TM), Ctx(ctx) { if (TM.getRegisterInfo()) RegInfo = new (Allocator.Allocate()) MachineRegisterInfo(*TM.getRegisterInfo()); -- cgit v1.2.3