diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-11 22:53:35 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-11 22:53:35 +0000 |
commit | c18409aed80ba1c6c5998befd3c3c8edc865c423 (patch) | |
tree | 85297b9076d8810b736b0bb046e8bde24e7dc436 /lib/CodeGen/LLVMTargetMachine.cpp | |
parent | 42263e2e407ab7d1d805e7b41cffd7217134d3b6 (diff) |
change MCContext to always have an MCAsmInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98293 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LLVMTargetMachine.cpp')
-rw-r--r-- | lib/CodeGen/LLVMTargetMachine.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<MCContext> Context(new MCContext()); + const MCAsmInfo &MAI = *getMCAsmInfo(); + OwningPtr<MCContext> Context(new MCContext(MAI)); OwningPtr<MCStreamer> 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, |