[llvm] r211508 - Delete utils/FileUpdate.

Rafael Espindola rafael.espindola at gmail.com
Mon Jun 23 10:58:40 PDT 2014


Author: rafael
Date: Mon Jun 23 12:58:39 2014
New Revision: 211508

URL: http://llvm.org/viewvc/llvm-project?rev=211508&view=rev
Log:
Delete utils/FileUpdate.

It is unused and it looks like it was never used.

Removed:
    llvm/trunk/utils/FileUpdate/CMakeLists.txt
    llvm/trunk/utils/FileUpdate/FileUpdate.cpp
    llvm/trunk/utils/FileUpdate/Makefile
Modified:
    llvm/trunk/CMakeLists.txt
    llvm/trunk/test/lit.cfg
    llvm/trunk/utils/Makefile

Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=211508&r1=211507&r2=211508&view=diff
==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Mon Jun 23 12:58:39 2014
@@ -499,7 +499,6 @@ add_subdirectory(lib)
 
 if( LLVM_INCLUDE_UTILS )
   add_subdirectory(utils/FileCheck)
-  add_subdirectory(utils/FileUpdate)
   add_subdirectory(utils/PerfectShuffle)
   add_subdirectory(utils/count)
   add_subdirectory(utils/not)

Modified: llvm/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lit.cfg?rev=211508&r1=211507&r2=211508&view=diff
==============================================================================
--- llvm/trunk/test/lit.cfg (original)
+++ llvm/trunk/test/lit.cfg Mon Jun 23 12:58:39 2014
@@ -243,7 +243,6 @@ for pattern in [r"\bbugpoint\b(?!-)",
                 r"\bmacho-dump\b",
                 NOJUNK + r"\bopt\b",
                 r"\bFileCheck\b",
-                r"\bFileUpdate\b",
                 r"\bobj2yaml\b",
                 r"\byaml2obj\b",
                 # Handle these specially as they are strings searched

Removed: llvm/trunk/utils/FileUpdate/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/FileUpdate/CMakeLists.txt?rev=211507&view=auto
==============================================================================
--- llvm/trunk/utils/FileUpdate/CMakeLists.txt (original)
+++ llvm/trunk/utils/FileUpdate/CMakeLists.txt (removed)
@@ -1,5 +0,0 @@
-add_llvm_utility(FileUpdate
-  FileUpdate.cpp
-  )
-
-target_link_libraries(FileUpdate LLVMSupport)

Removed: llvm/trunk/utils/FileUpdate/FileUpdate.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/FileUpdate/FileUpdate.cpp?rev=211507&view=auto
==============================================================================
--- llvm/trunk/utils/FileUpdate/FileUpdate.cpp (original)
+++ llvm/trunk/utils/FileUpdate/FileUpdate.cpp (removed)
@@ -1,87 +0,0 @@
-//===- FileUpdate.cpp - Conditionally update a file -----------------------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// FileUpdate is a utility for conditionally updating a file from its input
-// based on whether the input differs from the output. It is used to avoid
-// unnecessary modifications in a build system.
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/Support/CommandLine.h"
-#include "llvm/Support/FileSystem.h"
-#include "llvm/Support/MemoryBuffer.h"
-#include "llvm/Support/PrettyStackTrace.h"
-#include "llvm/Support/Signals.h"
-#include "llvm/Support/ToolOutputFile.h"
-#include <system_error>
-using namespace llvm;
-
-static cl::opt<bool>
-Quiet("quiet", cl::desc("Don't print unnecessary status information"),
-      cl::init(false));
-
-static cl::opt<std::string>
-InputFilename("input-file", cl::desc("Input file (defaults to stdin)"),
-              cl::init("-"), cl::value_desc("filename"));
-
-static cl::opt<std::string>
-OutputFilename(cl::Positional, cl::desc("<output-file>"), cl::Required);
-
-int main(int argc, char **argv) {
-  sys::PrintStackTraceOnErrorSignal();
-  PrettyStackTraceProgram X(argc, argv);
-  cl::ParseCommandLineOptions(argc, argv);
-
-  if (OutputFilename == "-") {
-    errs() << argv[0] << ": error: Can't update standard output\n";
-    return 1;
-  }
-
-  // Get the input data.
-  std::unique_ptr<MemoryBuffer> In;
-  if (std::error_code ec = MemoryBuffer::getFileOrSTDIN(InputFilename, In)) {
-    errs() << argv[0] << ": error: Unable to get input '"
-           << InputFilename << "': " << ec.message() << '\n';
-    return 1;
-  }
-
-  // Get the output data.
-  std::unique_ptr<MemoryBuffer> Out;
-  MemoryBuffer::getFile(OutputFilename.c_str(), Out);
-
-  // If the output exists and the contents match, we are done.
-  if (Out && In->getBufferSize() == Out->getBufferSize() &&
-      memcmp(In->getBufferStart(), Out->getBufferStart(),
-             Out->getBufferSize()) == 0) {
-    if (!Quiet)
-      errs() << argv[0] << ": Not updating '" << OutputFilename
-             << "', contents match input.\n";
-    return 0;
-  }
-
-  // Otherwise, overwrite the output.
-  if (!Quiet)
-    errs() << argv[0] << ": Updating '" << OutputFilename
-           << "', contents changed.\n";
-  std::string ErrorStr;
-  tool_output_file OutStream(OutputFilename.c_str(), ErrorStr,
-                             sys::fs::F_None);
-  if (!ErrorStr.empty()) {
-    errs() << argv[0] << ": Unable to write output '"
-           << OutputFilename << "': " << ErrorStr << '\n';
-    return 1;
-  }
-
-  OutStream.os().write(In->getBufferStart(), In->getBufferSize());
-
-  // Declare success.
-  OutStream.keep();
-
-  return 0;
-}

Removed: llvm/trunk/utils/FileUpdate/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/FileUpdate/Makefile?rev=211507&view=auto
==============================================================================
--- llvm/trunk/utils/FileUpdate/Makefile (original)
+++ llvm/trunk/utils/FileUpdate/Makefile (removed)
@@ -1,21 +0,0 @@
-##===- utils/FileUpdate/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 = FileUpdate
-USEDLIBS = LLVMSupport.a
-
-# This tool has no plugins, optimize startup time.
-TOOL_NO_EXPORTS = 1
-
-# Don't install this utility
-NO_INSTALL = 1
-
-include $(LEVEL)/Makefile.common
-

Modified: llvm/trunk/utils/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/Makefile?rev=211508&r1=211507&r2=211508&view=diff
==============================================================================
--- llvm/trunk/utils/Makefile (original)
+++ llvm/trunk/utils/Makefile Mon Jun 23 12:58:39 2014
@@ -8,8 +8,8 @@
 ##===----------------------------------------------------------------------===##
 
 LEVEL = ..
-PARALLEL_DIRS := FileCheck FileUpdate TableGen PerfectShuffle \
-	      count fpcmp llvm-lit not unittest
+PARALLEL_DIRS := FileCheck TableGen PerfectShuffle count fpcmp llvm-lit not \
+                 unittest
 
 EXTRA_DIST := check-each-file codegen-diff countloc.sh \
               DSAclean.py DSAextract.py emacs findsym.pl GenLibDeps.pl \





More information about the llvm-commits mailing list