Changes in directory llvm/lib/Target/ARM:
ARMAsmPrinter.cpp updated: 1.15 -> 1.16 ARMTargetMachine.h updated: 1.3 -> 1.4 --- Log message: Make target asm info a property of the target machine. --- Diffs of the changes: (+7 -15) ARMAsmPrinter.cpp | 17 ++--------------- ARMTargetMachine.h | 5 +++++ 2 files changed, 7 insertions(+), 15 deletions(-) Index: llvm/lib/Target/ARM/ARMAsmPrinter.cpp diff -u llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.15 llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.16 --- llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.15 Wed Sep 6 13:34:40 2006 +++ llvm/lib/Target/ARM/ARMAsmPrinter.cpp Thu Sep 7 17:06:40 2006 @@ -38,20 +38,8 @@ namespace { Statistic<> EmittedInsts("asm-printer", "Number of machine instrs printed"); - struct VISIBILITY_HIDDEN ARMTargetAsmInfo : public TargetAsmInfo { - ARMTargetAsmInfo() { - Data16bitsDirective = "\t.half\t"; - Data32bitsDirective = "\t.word\t"; - Data64bitsDirective = 0; - ZeroDirective = "\t.skip\t"; - CommentString = "@"; - ConstantPoolSection = "\t.text\n"; - AlignmentIsInBytes = false; - } - }; - struct VISIBILITY_HIDDEN ARMAsmPrinter : public AsmPrinter { - ARMAsmPrinter(std::ostream &O, TargetMachine &TM, TargetAsmInfo *T) + ARMAsmPrinter(std::ostream &O, TargetMachine &TM, const TargetAsmInfo *T) : AsmPrinter(O, TM, T) { } @@ -113,8 +101,7 @@ /// FunctionPass *llvm::createARMCodePrinterPass(std::ostream &o, TargetMachine &tm) { - ARMTargetAsmInfo *TAI = new ARMTargetAsmInfo(); - return new ARMAsmPrinter(o, tm, TAI); + return new ARMAsmPrinter(o, tm, tm.getTargetAsmInfo()); } /// runOnMachineFunction - This uses the printMachineInstruction() Index: llvm/lib/Target/ARM/ARMTargetMachine.h diff -u llvm/lib/Target/ARM/ARMTargetMachine.h:1.3 llvm/lib/Target/ARM/ARMTargetMachine.h:1.4 --- llvm/lib/Target/ARM/ARMTargetMachine.h:1.3 Sun Sep 3 23:14:57 2006 +++ llvm/lib/Target/ARM/ARMTargetMachine.h Thu Sep 7 17:06:40 2006 @@ -20,6 +20,7 @@ #include "llvm/Target/TargetFrameInfo.h" #include "ARMInstrInfo.h" #include "ARMFrameInfo.h" +#include "ARMTargetAsmInfo.h" namespace llvm { @@ -40,6 +41,10 @@ virtual const TargetData *getTargetData() const { return &DataLayout; } static unsigned getModuleMatchQuality(const Module &M); + virtual const TargetAsmInfo *createTargetAsmInfo() const { + return static_cast<const TargetAsmInfo *>(new ARMTargetAsmInfo(*this)); + } + // Pass Pipeline Configuration virtual bool addInstSelector(FunctionPassManager &PM, bool Fast); virtual bool addAssemblyEmitter(FunctionPassManager &PM, bool Fast, _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits