diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2008-08-07 09:54:23 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2008-08-07 09:54:23 +0000 |
commit | 0f3cc657387d44cd7c56e4ddea896a50ab9106b8 (patch) | |
tree | 986da786619ef83826de9e251ff958929c7b49c6 /lib/Target/ARM/ARMTargetMachine.cpp | |
parent | 79579c911f073073ab2108de71f09a4d6021760c (diff) |
Switch ARM to new section handling stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54458 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMTargetMachine.cpp')
-rw-r--r-- | lib/Target/ARM/ARMTargetMachine.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/Target/ARM/ARMTargetMachine.cpp b/lib/Target/ARM/ARMTargetMachine.cpp index 913ebe0fa5..468507427c 100644 --- a/lib/Target/ARM/ARMTargetMachine.cpp +++ b/lib/Target/ARM/ARMTargetMachine.cpp @@ -58,7 +58,7 @@ unsigned ThumbTargetMachine::getModuleMatchQuality(const Module &M) { return getJITMatchQuality()/2; } -ThumbTargetMachine::ThumbTargetMachine(const Module &M, const std::string &FS) +ThumbTargetMachine::ThumbTargetMachine(const Module &M, const std::string &FS) : ARMTargetMachine(M, FS, true) { } @@ -110,7 +110,14 @@ unsigned ARMTargetMachine::getModuleMatchQuality(const Module &M) { const TargetAsmInfo *ARMTargetMachine::createTargetAsmInfo() const { - return new ARMTargetAsmInfo(*this); + switch (Subtarget.TargetType) { + case ARMSubtarget::isDarwin: + return new ARMDarwinTargetAsmInfo(*this); + case ARMSubtarget::isELF: + return new ARMELFTargetAsmInfo(*this); + default: + return new ARMTargetAsmInfo(*this); + } } @@ -124,7 +131,7 @@ bool ARMTargetMachine::addPreEmitPass(PassManagerBase &PM, bool Fast) { // FIXME: temporarily disabling load / store optimization pass for Thumb mode. if (!Fast && !DisableLdStOpti && !Subtarget.isThumb()) PM.add(createARMLoadStoreOptimizationPass()); - + if (!Fast && !DisableIfConversion && !Subtarget.isThumb()) PM.add(createIfConverterPass()); @@ -132,7 +139,7 @@ bool ARMTargetMachine::addPreEmitPass(PassManagerBase &PM, bool Fast) { return true; } -bool ARMTargetMachine::addAssemblyEmitter(PassManagerBase &PM, bool Fast, +bool ARMTargetMachine::addAssemblyEmitter(PassManagerBase &PM, bool Fast, std::ostream &Out) { // Output assembly language. PM.add(createARMCodePrinterPass(Out, *this)); |