[llvm-commits] [llvm] r95168 - /llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp
Chris Lattner
sabre at nondot.org
Tue Feb 2 16:29:56 PST 2010
Author: lattner
Date: Tue Feb 2 18:29:55 2010
New Revision: 95168
URL: http://llvm.org/viewvc/llvm-project?rev=95168&view=rev
Log:
pass an instprinter into the AsmPrinter if it is available.
Modified:
llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp
Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=95168&r1=95167&r2=95168&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original)
+++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Tue Feb 2 18:29:55 2010
@@ -126,14 +126,18 @@
formatted_raw_ostream *LegacyOutput;
switch (FileType) {
default: return CGFT_ErrorOccurred;
- case CGFT_AssemblyFile:
- AsmStreamer.reset(createAsmStreamer(*Context, Out, *getMCAsmInfo(),
+ case CGFT_AssemblyFile: {
+ const MCAsmInfo &MAI = *getMCAsmInfo();
+ MCInstPrinter *InstPrinter =
+ getTarget().createMCInstPrinter(MAI.getAssemblerDialect(), MAI, Out);
+ AsmStreamer.reset(createAsmStreamer(*Context, Out, MAI,
getTargetData()->isLittleEndian(),
- getVerboseAsm(), /*instprinter*/0,
+ getVerboseAsm(), InstPrinter,
/*codeemitter*/0));
// Set the AsmPrinter's "O" to the output file.
LegacyOutput = &Out;
break;
+ }
case CGFT_ObjectFile: {
// Create the code emitter for the target if it exists. If not, .o file
// emission fails.
More information about the llvm-commits
mailing list