mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-15 07:39:31 +00:00
Simplify some of the code. No functionality change.
llvm-svn: 184172
This commit is contained in:
parent
e529c33f15
commit
0dd1843240
@ -164,6 +164,7 @@ bool LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM,
|
|||||||
|
|
||||||
const MCAsmInfo &MAI = *getMCAsmInfo();
|
const MCAsmInfo &MAI = *getMCAsmInfo();
|
||||||
const MCRegisterInfo &MRI = *getRegisterInfo();
|
const MCRegisterInfo &MRI = *getRegisterInfo();
|
||||||
|
const MCInstrInfo &MII = *getInstrInfo();
|
||||||
const MCSubtargetInfo &STI = getSubtarget<MCSubtargetInfo>();
|
const MCSubtargetInfo &STI = getSubtarget<MCSubtargetInfo>();
|
||||||
OwningPtr<MCStreamer> AsmStreamer;
|
OwningPtr<MCStreamer> AsmStreamer;
|
||||||
|
|
||||||
@ -171,16 +172,13 @@ bool LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM,
|
|||||||
case CGFT_AssemblyFile: {
|
case CGFT_AssemblyFile: {
|
||||||
MCInstPrinter *InstPrinter =
|
MCInstPrinter *InstPrinter =
|
||||||
getTarget().createMCInstPrinter(MAI.getAssemblerDialect(), MAI,
|
getTarget().createMCInstPrinter(MAI.getAssemblerDialect(), MAI,
|
||||||
*getInstrInfo(),
|
MII, MRI, STI);
|
||||||
Context->getRegisterInfo(), STI);
|
|
||||||
|
|
||||||
// Create a code emitter if asked to show the encoding.
|
// Create a code emitter if asked to show the encoding.
|
||||||
MCCodeEmitter *MCE = 0;
|
MCCodeEmitter *MCE = 0;
|
||||||
MCAsmBackend *MAB = 0;
|
MCAsmBackend *MAB = 0;
|
||||||
if (ShowMCEncoding) {
|
if (ShowMCEncoding) {
|
||||||
const MCSubtargetInfo &STI = getSubtarget<MCSubtargetInfo>();
|
MCE = getTarget().createMCCodeEmitter(MII, MRI, STI, *Context);
|
||||||
MCE = getTarget().createMCCodeEmitter(*getInstrInfo(), MRI, STI,
|
|
||||||
*Context);
|
|
||||||
MAB = getTarget().createMCAsmBackend(getTargetTriple(), TargetCPU);
|
MAB = getTarget().createMCAsmBackend(getTargetTriple(), TargetCPU);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -198,8 +196,8 @@ bool LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM,
|
|||||||
case CGFT_ObjectFile: {
|
case CGFT_ObjectFile: {
|
||||||
// Create the code emitter for the target if it exists. If not, .o file
|
// Create the code emitter for the target if it exists. If not, .o file
|
||||||
// emission fails.
|
// emission fails.
|
||||||
MCCodeEmitter *MCE = getTarget().createMCCodeEmitter(*getInstrInfo(), MRI,
|
MCCodeEmitter *MCE = getTarget().createMCCodeEmitter(MII, MRI, STI,
|
||||||
STI, *Context);
|
*Context);
|
||||||
MCAsmBackend *MAB = getTarget().createMCAsmBackend(getTargetTriple(),
|
MCAsmBackend *MAB = getTarget().createMCAsmBackend(getTargetTriple(),
|
||||||
TargetCPU);
|
TargetCPU);
|
||||||
if (MCE == 0 || MAB == 0)
|
if (MCE == 0 || MAB == 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user