diff options
Diffstat (limited to 'lib/Target/ARM/ARMTargetMachine.cpp')
-rw-r--r-- | lib/Target/ARM/ARMTargetMachine.cpp | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/lib/Target/ARM/ARMTargetMachine.cpp b/lib/Target/ARM/ARMTargetMachine.cpp index 9aa7c1f..1c05ab5 100644 --- a/lib/Target/ARM/ARMTargetMachine.cpp +++ b/lib/Target/ARM/ARMTargetMachine.cpp @@ -34,13 +34,12 @@ static MCAsmInfo *createMCAsmInfo(const Target &T, StringRef TT) { // This is duplicated code. Refactor this. static MCStreamer *createMCStreamer(const Target &T, const std::string &TT, MCContext &Ctx, TargetAsmBackend &TAB, - raw_ostream &_OS, - MCCodeEmitter *_Emitter, + raw_ostream &OS, + MCCodeEmitter *Emitter, bool RelaxAll) { - Triple TheTriple(TT); - switch (TheTriple.getOS()) { + switch (Triple(TT).getOS()) { case Triple::Darwin: - return createMachOStreamer(Ctx, TAB, _OS, _Emitter, RelaxAll); + return createMachOStreamer(Ctx, TAB, OS, Emitter, RelaxAll); case Triple::MinGW32: case Triple::MinGW64: case Triple::Cygwin: @@ -48,7 +47,7 @@ static MCStreamer *createMCStreamer(const Target &T, const std::string &TT, llvm_unreachable("ARM does not support Windows COFF format"); return NULL; default: - return createELFStreamer(Ctx, TAB, _OS, _Emitter, RelaxAll); + return createELFStreamer(Ctx, TAB, OS, Emitter, RelaxAll); } } @@ -62,22 +61,16 @@ extern "C" void LLVMInitializeARMTarget() { RegisterAsmInfoFn B(TheThumbTarget, createMCAsmInfo); // Register the MC Code Emitter - TargetRegistry::RegisterCodeEmitter(TheARMTarget, - createARMMCCodeEmitter); - TargetRegistry::RegisterCodeEmitter(TheThumbTarget, - createARMMCCodeEmitter); + TargetRegistry::RegisterCodeEmitter(TheARMTarget, createARMMCCodeEmitter); + TargetRegistry::RegisterCodeEmitter(TheThumbTarget, createARMMCCodeEmitter); // Register the asm backend. - TargetRegistry::RegisterAsmBackend(TheARMTarget, - createARMAsmBackend); - TargetRegistry::RegisterAsmBackend(TheThumbTarget, - createARMAsmBackend); + TargetRegistry::RegisterAsmBackend(TheARMTarget, createARMAsmBackend); + TargetRegistry::RegisterAsmBackend(TheThumbTarget, createARMAsmBackend); // Register the object streamer. - TargetRegistry::RegisterObjectStreamer(TheARMTarget, - createMCStreamer); - TargetRegistry::RegisterObjectStreamer(TheThumbTarget, - createMCStreamer); + TargetRegistry::RegisterObjectStreamer(TheARMTarget, createMCStreamer); + TargetRegistry::RegisterObjectStreamer(TheThumbTarget, createMCStreamer); } |