From fd0f12e3443dab14a052aa965ab4fddf3b9a0b80 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 11 Mar 2010 22:53:35 +0000 Subject: change MCContext to always have an MCAsmInfo. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98293 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/LLVMTargetMachine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/CodeGen/LLVMTargetMachine.cpp') diff --git a/lib/CodeGen/LLVMTargetMachine.cpp b/lib/CodeGen/LLVMTargetMachine.cpp index 23ef8ba7ce..0174d55912 100644 --- a/lib/CodeGen/LLVMTargetMachine.cpp +++ b/lib/CodeGen/LLVMTargetMachine.cpp @@ -121,14 +121,14 @@ bool LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM, if (addCommonCodeGenPasses(PM, OptLevel, DisableVerify)) return true; - OwningPtr Context(new MCContext()); + const MCAsmInfo &MAI = *getMCAsmInfo(); + OwningPtr Context(new MCContext(MAI)); OwningPtr AsmStreamer; formatted_raw_ostream *LegacyOutput; switch (FileType) { default: return true; case CGFT_AssemblyFile: { - const MCAsmInfo &MAI = *getMCAsmInfo(); MCInstPrinter *InstPrinter = getTarget().createMCInstPrinter(MAI.getAssemblerDialect(), MAI, Out); AsmStreamer.reset(createAsmStreamer(*Context, Out, MAI, -- cgit v1.2.3