aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRichard Osborne <richard@xmos.com>2009-08-15 12:53:15 +0000
committerRichard Osborne <richard@xmos.com>2009-08-15 12:53:15 +0000
commit1c8c15f6d2f3f7ffbeff5daa211907dff1b13650 (patch)
tree66826705f826210dac0342cfcc25d97bc81ca393 /lib
parent7d927212de4371e8883cab5b00651528baa6f83b (diff)
downloadexternal_llvm-1c8c15f6d2f3f7ffbeff5daa211907dff1b13650.zip
external_llvm-1c8c15f6d2f3f7ffbeff5daa211907dff1b13650.tar.gz
external_llvm-1c8c15f6d2f3f7ffbeff5daa211907dff1b13650.tar.bz2
Move XCore AsmPrinter to XCore/AsmPrinter directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79094 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/XCore/AsmPrinter/CMakeLists.txt6
-rw-r--r--lib/Target/XCore/AsmPrinter/Makefile15
-rw-r--r--lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp (renamed from lib/Target/XCore/XCoreAsmPrinter.cpp)8
-rw-r--r--lib/Target/XCore/CMakeLists.txt1
-rw-r--r--lib/Target/XCore/Makefile4
-rw-r--r--lib/Target/XCore/XCoreTargetMachine.cpp7
6 files changed, 32 insertions, 9 deletions
diff --git a/lib/Target/XCore/AsmPrinter/CMakeLists.txt b/lib/Target/XCore/AsmPrinter/CMakeLists.txt
new file mode 100644
index 0000000..7c7c2f4
--- /dev/null
+++ b/lib/Target/XCore/AsmPrinter/CMakeLists.txt
@@ -0,0 +1,6 @@
+include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. )
+
+add_llvm_library(LLVMXCoreAsmPrinter
+ XCoreAsmPrinter.cpp
+ )
+add_dependencies(LLVMXCoreAsmPrinter XCoreCodeGenTable_gen)
diff --git a/lib/Target/XCore/AsmPrinter/Makefile b/lib/Target/XCore/AsmPrinter/Makefile
new file mode 100644
index 0000000..afcb080
--- /dev/null
+++ b/lib/Target/XCore/AsmPrinter/Makefile
@@ -0,0 +1,15 @@
+##===- lib/Target/ARM/Makefile -----------------------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+LEVEL = ../../../..
+LIBRARYNAME = LLVMXCoreAsmPrinter
+
+# Hack: we need to include 'main' XCore target directory to grab private headers
+CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..
+
+include $(LEVEL)/Makefile.common
diff --git a/lib/Target/XCore/XCoreAsmPrinter.cpp b/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp
index 2b706ee..87a09568 100644
--- a/lib/Target/XCore/XCoreAsmPrinter.cpp
+++ b/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp
@@ -374,11 +374,7 @@ bool XCoreAsmPrinter::doInitialization(Module &M) {
return Result;
}
-
-
// Force static initialization.
-extern "C" void LLVMInitializeXCoreTarget() {
- RegisterTargetMachine<XCoreTargetMachine> X(TheXCoreTarget);
- RegisterAsmPrinter<XCoreAsmPrinter> Y(TheXCoreTarget);
- RegisterAsmInfo<XCoreTargetAsmInfo> Z(TheXCoreTarget);
+extern "C" void LLVMInitializeXCoreAsmPrinter() {
+ RegisterAsmPrinter<XCoreAsmPrinter> X(TheXCoreTarget);
}
diff --git a/lib/Target/XCore/CMakeLists.txt b/lib/Target/XCore/CMakeLists.txt
index 26f43a9..ed2f1f3 100644
--- a/lib/Target/XCore/CMakeLists.txt
+++ b/lib/Target/XCore/CMakeLists.txt
@@ -12,7 +12,6 @@ tablegen(XCoreGenSubtarget.inc -gen-subtarget)
add_llvm_target(XCore
MCSectionXCore.cpp
- XCoreAsmPrinter.cpp
XCoreFrameInfo.cpp
XCoreInstrInfo.cpp
XCoreISelDAGToDAG.cpp
diff --git a/lib/Target/XCore/Makefile b/lib/Target/XCore/Makefile
index 9ca4560..bd3b52a 100644
--- a/lib/Target/XCore/Makefile
+++ b/lib/Target/XCore/Makefile
@@ -7,7 +7,7 @@
#
##===----------------------------------------------------------------------===##
LEVEL = ../../..
-LIBRARYNAME = LLVMXCore
+LIBRARYNAME = LLVMXCoreCodeGen
TARGET = XCore
# Make sure that tblgen is run, first thing.
@@ -17,7 +17,7 @@ BUILT_SOURCES = XCoreGenRegisterInfo.h.inc XCoreGenRegisterNames.inc \
XCoreGenDAGISel.inc XCoreGenCallingConv.inc \
XCoreGenSubtarget.inc
-DIRS = TargetInfo
+DIRS = AsmPrinter TargetInfo
include $(LEVEL)/Makefile.common
diff --git a/lib/Target/XCore/XCoreTargetMachine.cpp b/lib/Target/XCore/XCoreTargetMachine.cpp
index 57176cc..b1afc7e 100644
--- a/lib/Target/XCore/XCoreTargetMachine.cpp
+++ b/lib/Target/XCore/XCoreTargetMachine.cpp
@@ -15,6 +15,7 @@
#include "XCore.h"
#include "llvm/Module.h"
#include "llvm/PassManager.h"
+#include "llvm/Target/TargetRegistry.h"
using namespace llvm;
/// XCoreTargetMachine ctor - Create an ILP32 architecture model
@@ -35,3 +36,9 @@ bool XCoreTargetMachine::addInstSelector(PassManagerBase &PM,
PM.add(createXCoreISelDag(*this));
return false;
}
+
+// Force static initialization.
+extern "C" void LLVMInitializeXCoreTarget() {
+ RegisterTargetMachine<XCoreTargetMachine> X(TheXCoreTarget);
+ RegisterAsmInfo<XCoreTargetAsmInfo> Y(TheXCoreTarget);
+}