aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-11-27 05:58:44 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-11-27 05:58:44 +0000
commit75373ac0c3cd299cfb45514d5bc0bc0761233fdd (patch)
tree31912468add3e0d4af96767a4053b8f1d67f78c3 /tools
parentfbd25b7d1d030ca0cbea28c690b636c35299826e (diff)
downloadexternal_llvm-75373ac0c3cd299cfb45514d5bc0bc0761233fdd.zip
external_llvm-75373ac0c3cd299cfb45514d5bc0bc0761233fdd.tar.gz
external_llvm-75373ac0c3cd299cfb45514d5bc0bc0761233fdd.tar.bz2
macho-dump: Stub out C++ macho-dump tool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120191 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/CMakeLists.txt1
-rw-r--r--tools/Makefile2
-rw-r--r--tools/macho-dump/CMakeLists.txt5
-rw-r--r--tools/macho-dump/Makefile23
-rw-r--r--tools/macho-dump/macho-dump.cpp30
5 files changed, 60 insertions, 1 deletions
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 89d858c..aad45c0 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -36,6 +36,7 @@ add_subdirectory(lli)
add_subdirectory(llvm-extract)
add_subdirectory(llvm-diff)
+add_subdirectory(macho-dump)
add_subdirectory(bugpoint)
add_subdirectory(bugpoint-passes)
diff --git a/tools/Makefile b/tools/Makefile
index 84ffa06..928933a 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -21,7 +21,7 @@ PARALLEL_DIRS := opt llvm-as llvm-dis \
llvm-ld llvm-prof llvm-link \
lli llvm-extract llvm-mc \
bugpoint llvm-bcanalyzer llvm-stub \
- llvmc llvm-diff
+ llvmc llvm-diff macho-dump
# Let users override the set of tools to build from the command line.
ifdef ONLY_TOOLS
diff --git a/tools/macho-dump/CMakeLists.txt b/tools/macho-dump/CMakeLists.txt
new file mode 100644
index 0000000..9ade5ea
--- /dev/null
+++ b/tools/macho-dump/CMakeLists.txt
@@ -0,0 +1,5 @@
+set(LLVM_LINK_COMPONENTS ${LLVM_TARGETS_TO_BUILD} support object)
+
+add_llvm_tool(macho-dumpx
+ macho-dump.cpp
+ )
diff --git a/tools/macho-dump/Makefile b/tools/macho-dump/Makefile
new file mode 100644
index 0000000..7f965f3
--- /dev/null
+++ b/tools/macho-dump/Makefile
@@ -0,0 +1,23 @@
+##===- tools/macho-dump/Makefile ---------------------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LEVEL = ../..
+TOOLNAME = macho-dumpx
+
+# This tool has no plugins, optimize startup time.
+TOOL_NO_EXPORTS = 1
+
+# Include this here so we can get the configuration of the targets
+# that have been configured for construction. We have to do this
+# early so we can set up LINK_COMPONENTS before including Makefile.rules
+include $(LEVEL)/Makefile.config
+
+LINK_COMPONENTS := support object
+
+include $(LLVM_SRC_ROOT)/Makefile.rules
diff --git a/tools/macho-dump/macho-dump.cpp b/tools/macho-dump/macho-dump.cpp
new file mode 100644
index 0000000..7825b11
--- /dev/null
+++ b/tools/macho-dump/macho-dump.cpp
@@ -0,0 +1,30 @@
+//===-- macho-dump.cpp - Mach Object Dumping Tool -------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This is a testing tool for use with the MC/Mach-O LLVM components.
+//
+//===----------------------------------------------------------------------===//
+
+#include "llvm/Support/CommandLine.h"
+#include "llvm/Support/ManagedStatic.h"
+#include "llvm/Support/raw_ostream.h"
+using namespace llvm;
+
+static cl::opt<std::string>
+InputFile(cl::Positional, cl::desc("<input file>"), cl::init("-"));
+
+int main(int argc, char **argv) {
+ const char *ProgramName = argv[0];
+ llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
+
+ cl::ParseCommandLineOptions(argc, argv, "llvm Mach-O dumping tool\n");
+
+ errs() << ProgramName << ": " << "not yet implemented!" << "\n";
+ return 1;
+}