summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86TargetMachine.h
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2008-08-17 13:53:59 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2008-08-17 13:53:59 +0000
commitc5faeb82b5a969ac708ebcfa126ac346ff0ab3d8 (patch)
tree1c9642758398f70b075d38af27ef562cd23e3728 /llvm/lib/Target/X86/X86TargetMachine.h
parent9cb0e94dc79657144d639c722619e1e4fc19040e (diff)
downloadbcm5719-llvm-c5faeb82b5a969ac708ebcfa126ac346ff0ab3d8.tar.gz
bcm5719-llvm-c5faeb82b5a969ac708ebcfa126ac346ff0ab3d8.zip
Move X86 assembler printers into separate directory. This allows JIT-only users not to link it in (use 'x86codegen' llvm-config arg for this)
llvm-svn: 54886
Diffstat (limited to 'llvm/lib/Target/X86/X86TargetMachine.h')
-rw-r--r--llvm/lib/Target/X86/X86TargetMachine.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86TargetMachine.h b/llvm/lib/Target/X86/X86TargetMachine.h
index 5f814ea7040..94b756671c4 100644
--- a/llvm/lib/Target/X86/X86TargetMachine.h
+++ b/llvm/lib/Target/X86/X86TargetMachine.h
@@ -38,7 +38,13 @@ class X86TargetMachine : public LLVMTargetMachine {
protected:
virtual const TargetAsmInfo *createTargetAsmInfo() const;
-
+
+ // To avoid having target depend on the asmprinter stuff libraries, asmprinter
+ // set this functions to ctor pointer at startup time if they are linked in.
+ typedef FunctionPass *(*AsmPrinterCtorFn)(std::ostream &o,
+ X86TargetMachine &tm);
+ static AsmPrinterCtorFn AsmPrinterCtor;
+
public:
X86TargetMachine(const Module &M, const std::string &FS, bool is64Bit);
@@ -59,7 +65,11 @@ public:
static unsigned getModuleMatchQuality(const Module &M);
static unsigned getJITMatchQuality();
-
+
+ static void registerAsmPrinter(AsmPrinterCtorFn F) {
+ AsmPrinterCtor = F;
+ }
+
// Set up the pass pipeline.
virtual bool addInstSelector(PassManagerBase &PM, bool Fast);
virtual bool addPreRegAlloc(PassManagerBase &PM, bool Fast);
OpenPOWER on IntegriCloud