Make target asm info a property of the target machine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30162 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/Alpha/AlphaAsmPrinter.cpp b/lib/Target/Alpha/AlphaAsmPrinter.cpp
index d709ed7..2ce4865 100644
--- a/lib/Target/Alpha/AlphaAsmPrinter.cpp
+++ b/lib/Target/Alpha/AlphaAsmPrinter.cpp
@@ -29,20 +29,13 @@
namespace {
Statistic<> EmittedInsts("asm-printer", "Number of machine instrs printed");
- struct VISIBILITY_HIDDEN AlphaTargetAsmInfo : public TargetAsmInfo {
- AlphaTargetAsmInfo() {
- AlignmentIsInBytes = false;
- PrivateGlobalPrefix = "$";
- }
- };
-
struct VISIBILITY_HIDDEN AlphaAsmPrinter : public AsmPrinter {
/// Unique incrementer for label values for referencing Global values.
///
unsigned LabelNumber;
- AlphaAsmPrinter(std::ostream &o, TargetMachine &tm, TargetAsmInfo *T)
+ AlphaAsmPrinter(std::ostream &o, TargetMachine &tm, const TargetAsmInfo *T)
: AsmPrinter(o, tm, T), LabelNumber(0) {
}
@@ -82,8 +75,7 @@
///
FunctionPass *llvm::createAlphaCodePrinterPass (std::ostream &o,
TargetMachine &tm) {
- AlphaTargetAsmInfo *TAI = new AlphaTargetAsmInfo();
- return new AlphaAsmPrinter(o, tm, TAI);
+ return new AlphaAsmPrinter(o, tm, tm.getTargetAsmInfo());
}
#include "AlphaGenAsmWriter.inc"