[llvm-commits] [llvm] r82393 - in /llvm/trunk/lib/Target/X86/AsmPrinter: X86ATTAsmPrinter.cpp X86AsmPrinter.cpp
Chris Lattner
sabre at nondot.org
Sun Sep 20 00:39:06 PDT 2009
Author: lattner
Date: Sun Sep 20 02:39:06 2009
New Revision: 82393
URL: http://llvm.org/viewvc/llvm-project?rev=82393&view=rev
Log:
move target registry stuff to X86ATTAsmPrinter.cpp
Modified:
llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp
Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp?rev=82393&r1=82392&r2=82393&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp Sun Sep 20 02:39:06 2009
@@ -40,6 +40,7 @@
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/Target/TargetLoweringObjectFile.h"
#include "llvm/Target/TargetOptions.h"
+#include "llvm/Target/TargetRegistry.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/Statistic.h"
using namespace llvm;
@@ -920,3 +921,27 @@
}
}
+
+//===----------------------------------------------------------------------===//
+// Target Registry Stuff
+//===----------------------------------------------------------------------===//
+
+static MCInstPrinter *createX86MCInstPrinter(const Target &T,
+ unsigned SyntaxVariant,
+ const MCAsmInfo &MAI,
+ raw_ostream &O) {
+ if (SyntaxVariant == 0)
+ return new X86ATTInstPrinter(O, MAI);
+ if (SyntaxVariant == 1)
+ return new X86IntelInstPrinter(O, MAI);
+ return 0;
+}
+
+// Force static initialization.
+extern "C" void LLVMInitializeX86AsmPrinter() {
+ RegisterAsmPrinter<X86AsmPrinter> X(TheX86_32Target);
+ RegisterAsmPrinter<X86AsmPrinter> Y(TheX86_64Target);
+
+ TargetRegistry::RegisterMCInstPrinter(TheX86_32Target,createX86MCInstPrinter);
+ TargetRegistry::RegisterMCInstPrinter(TheX86_64Target,createX86MCInstPrinter);
+}
Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp?rev=82393&r1=82392&r2=82393&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp Sun Sep 20 02:39:06 2009
@@ -14,30 +14,3 @@
//
//===----------------------------------------------------------------------===//
-#include "X86.h"
-#include "X86ATTAsmPrinter.h"
-#include "X86ATTInstPrinter.h"
-#include "X86IntelInstPrinter.h"
-#include "llvm/MC/MCAsmInfo.h"
-#include "llvm/Target/TargetRegistry.h"
-using namespace llvm;
-
-static MCInstPrinter *createX86MCInstPrinter(const Target &T,
- unsigned SyntaxVariant,
- const MCAsmInfo &MAI,
- raw_ostream &O) {
- if (SyntaxVariant == 0)
- return new X86ATTInstPrinter(O, MAI);
- if (SyntaxVariant == 1)
- return new X86IntelInstPrinter(O, MAI);
- return 0;
-}
-
-// Force static initialization.
-extern "C" void LLVMInitializeX86AsmPrinter() {
- RegisterAsmPrinter<X86AsmPrinter> X(TheX86_32Target);
- RegisterAsmPrinter<X86AsmPrinter> Y(TheX86_64Target);
-
- TargetRegistry::RegisterMCInstPrinter(TheX86_32Target,createX86MCInstPrinter);
- TargetRegistry::RegisterMCInstPrinter(TheX86_64Target,createX86MCInstPrinter);
-}
More information about the llvm-commits
mailing list