summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-02-03 00:29:55 +0000
committerChris Lattner <sabre@nondot.org>2010-02-03 00:29:55 +0000
commit249453fff0ff8037eb60c8d750216eaa362b7b8e (patch)
tree6ac76988e08bbde679343dd568776b5c0982aa56 /llvm/lib/CodeGen
parentb92a1565c37194cee915249eb1330c05cbef6c7e (diff)
downloadbcm5719-llvm-249453fff0ff8037eb60c8d750216eaa362b7b8e.tar.gz
bcm5719-llvm-249453fff0ff8037eb60c8d750216eaa362b7b8e.zip
pass an instprinter into the AsmPrinter if it is available.
llvm-svn: 95168
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/LLVMTargetMachine.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
index a53fdcc2a04..2083c0a7cfe 100644
--- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
@@ -126,14 +126,18 @@ LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM,
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.
OpenPOWER on IntegriCloud