[llvm-commits] [llvm] r120191 - in /llvm/trunk/tools: CMakeLists.txt Makefile macho-dump/ macho-dump/CMakeLists.txt macho-dump/Makefile macho-dump/macho-dump.cpp
Daniel Dunbar
daniel at zuster.org
Fri Nov 26 21:58:44 PST 2010
Author: ddunbar
Date: Fri Nov 26 23:58:44 2010
New Revision: 120191
URL: http://llvm.org/viewvc/llvm-project?rev=120191&view=rev
Log:
macho-dump: Stub out C++ macho-dump tool.
Added:
llvm/trunk/tools/macho-dump/
llvm/trunk/tools/macho-dump/CMakeLists.txt
llvm/trunk/tools/macho-dump/Makefile
llvm/trunk/tools/macho-dump/macho-dump.cpp
Modified:
llvm/trunk/tools/CMakeLists.txt
llvm/trunk/tools/Makefile
Modified: llvm/trunk/tools/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/CMakeLists.txt?rev=120191&r1=120190&r2=120191&view=diff
==============================================================================
--- llvm/trunk/tools/CMakeLists.txt (original)
+++ llvm/trunk/tools/CMakeLists.txt Fri Nov 26 23:58:44 2010
@@ -36,6 +36,7 @@
add_subdirectory(llvm-extract)
add_subdirectory(llvm-diff)
+add_subdirectory(macho-dump)
add_subdirectory(bugpoint)
add_subdirectory(bugpoint-passes)
Modified: llvm/trunk/tools/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/Makefile?rev=120191&r1=120190&r2=120191&view=diff
==============================================================================
--- llvm/trunk/tools/Makefile (original)
+++ llvm/trunk/tools/Makefile Fri Nov 26 23:58:44 2010
@@ -21,7 +21,7 @@
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
Added: llvm/trunk/tools/macho-dump/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/macho-dump/CMakeLists.txt?rev=120191&view=auto
==============================================================================
--- llvm/trunk/tools/macho-dump/CMakeLists.txt (added)
+++ llvm/trunk/tools/macho-dump/CMakeLists.txt Fri Nov 26 23:58:44 2010
@@ -0,0 +1,5 @@
+set(LLVM_LINK_COMPONENTS ${LLVM_TARGETS_TO_BUILD} support object)
+
+add_llvm_tool(macho-dumpx
+ macho-dump.cpp
+ )
Added: llvm/trunk/tools/macho-dump/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/macho-dump/Makefile?rev=120191&view=auto
==============================================================================
--- llvm/trunk/tools/macho-dump/Makefile (added)
+++ llvm/trunk/tools/macho-dump/Makefile Fri Nov 26 23:58:44 2010
@@ -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
Added: llvm/trunk/tools/macho-dump/macho-dump.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/macho-dump/macho-dump.cpp?rev=120191&view=auto
==============================================================================
--- llvm/trunk/tools/macho-dump/macho-dump.cpp (added)
+++ llvm/trunk/tools/macho-dump/macho-dump.cpp Fri Nov 26 23:58:44 2010
@@ -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;
+}
More information about the llvm-commits
mailing list