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 | 768ea2add24daea98730533995ce6b33f317c4f8 (patch) | |
tree | c4433fb9400f9c104fb00707c545f27c2cbe12b9 /llvm/lib/CodeGen | |
parent | 03627cb12c066a4aed81536a7b9f4af1a59e8fa1 (diff) | |
download | bcm5719-llvm-768ea2add24daea98730533995ce6b33f317c4f8.tar.gz bcm5719-llvm-768ea2add24daea98730533995ce6b33f317c4f8.zip |
change MCContext to always have an MCAsmInfo.
llvm-svn: 98293
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/ELFWriter.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/CodeGen/LLVMTargetMachine.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/ELFWriter.cpp b/llvm/lib/CodeGen/ELFWriter.cpp index 0979c04ea8a..a748b8bb4cd 100644 --- a/llvm/lib/CodeGen/ELFWriter.cpp +++ b/llvm/lib/CodeGen/ELFWriter.cpp @@ -64,7 +64,7 @@ char ELFWriter::ID = 0; ELFWriter::ELFWriter(raw_ostream &o, TargetMachine &tm) : MachineFunctionPass(&ID), O(o), TM(tm), - OutContext(*new MCContext()), + OutContext(*new MCContext(*TM.getMCAsmInfo())), TLOF(TM.getTargetLowering()->getObjFileLowering()), is64Bit(TM.getTargetData()->getPointerSizeInBits() == 64), isLittleEndian(TM.getTargetData()->isLittleEndian()), diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp index 23ef8ba7ce4..0174d559125 100644 --- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp +++ b/llvm/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, |