[llvm] r184172 - Simplify some of the code. No functionality change.
Bill Wendling
isanbard at gmail.com
Mon Jun 17 23:07:27 PDT 2013
Author: void
Date: Tue Jun 18 01:07:26 2013
New Revision: 184172
URL: http://llvm.org/viewvc/llvm-project?rev=184172&view=rev
Log:
Simplify some of the code. No functionality change.
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=184172&r1=184171&r2=184172&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original)
+++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Tue Jun 18 01:07:26 2013
@@ -164,6 +164,7 @@ bool LLVMTargetMachine::addPassesToEmitF
const MCAsmInfo &MAI = *getMCAsmInfo();
const MCRegisterInfo &MRI = *getRegisterInfo();
+ const MCInstrInfo &MII = *getInstrInfo();
const MCSubtargetInfo &STI = getSubtarget<MCSubtargetInfo>();
OwningPtr<MCStreamer> AsmStreamer;
@@ -171,16 +172,13 @@ bool LLVMTargetMachine::addPassesToEmitF
case CGFT_AssemblyFile: {
MCInstPrinter *InstPrinter =
getTarget().createMCInstPrinter(MAI.getAssemblerDialect(), MAI,
- *getInstrInfo(),
- Context->getRegisterInfo(), STI);
+ MII, MRI, STI);
// Create a code emitter if asked to show the encoding.
MCCodeEmitter *MCE = 0;
MCAsmBackend *MAB = 0;
if (ShowMCEncoding) {
- const MCSubtargetInfo &STI = getSubtarget<MCSubtargetInfo>();
- MCE = getTarget().createMCCodeEmitter(*getInstrInfo(), MRI, STI,
- *Context);
+ MCE = getTarget().createMCCodeEmitter(MII, MRI, STI, *Context);
MAB = getTarget().createMCAsmBackend(getTargetTriple(), TargetCPU);
}
@@ -198,8 +196,8 @@ bool LLVMTargetMachine::addPassesToEmitF
case CGFT_ObjectFile: {
// Create the code emitter for the target if it exists. If not, .o file
// emission fails.
- MCCodeEmitter *MCE = getTarget().createMCCodeEmitter(*getInstrInfo(), MRI,
- STI, *Context);
+ MCCodeEmitter *MCE = getTarget().createMCCodeEmitter(MII, MRI, STI,
+ *Context);
MCAsmBackend *MAB = getTarget().createMCAsmBackend(getTargetTriple(),
TargetCPU);
if (MCE == 0 || MAB == 0)
More information about the llvm-commits
mailing list