summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
authorEric Beckmann <ecbeckmann@google.com>2017-06-16 22:00:42 +0000
committerEric Beckmann <ecbeckmann@google.com>2017-06-16 22:00:42 +0000
commit7687f04672b10c01be1a75d33d0c103fec4e4100 (patch)
tree229a5e22f366d273b70648bd6445524b9949bb0c /llvm/tools
parent74b4ded0c21a5976336fa603b4e7db288929f360 (diff)
downloadbcm5719-llvm-7687f04672b10c01be1a75d33d0c103fec4e4100.tar.gz
bcm5719-llvm-7687f04672b10c01be1a75d33d0c103fec4e4100.zip
Clean up some things in the WindowsResource changes.
llvm-svn: 305596
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/llvm-cvtres/llvm-cvtres.cpp15
-rw-r--r--llvm/tools/llvm-cvtres/llvm-cvtres.h17
2 files changed, 6 insertions, 26 deletions
diff --git a/llvm/tools/llvm-cvtres/llvm-cvtres.cpp b/llvm/tools/llvm-cvtres/llvm-cvtres.cpp
index 4aaf455fa45..ba8594e7766 100644
--- a/llvm/tools/llvm-cvtres/llvm-cvtres.cpp
+++ b/llvm/tools/llvm-cvtres/llvm-cvtres.cpp
@@ -12,8 +12,6 @@
//
//===----------------------------------------------------------------------===//
-#include "llvm-cvtres.h"
-
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Object/Binary.h"
#include "llvm/Object/WindowsResource.h"
@@ -29,6 +27,8 @@
#include "llvm/Support/Signals.h"
#include "llvm/Support/raw_ostream.h"
+#include <system_error>
+
using namespace llvm;
using namespace object;
@@ -142,8 +142,8 @@ int main(int argc_, const char *argv_[]) {
if (InputArgs.hasArg(OPT_OUT)) {
OutputFile = InputArgs.getLastArgValue(OPT_OUT);
} else {
- OutputFile = llvm::sys::path::filename(StringRef(InputFiles[0]));
- llvm::sys::path::replace_extension(OutputFile, ".obj");
+ OutputFile = sys::path::filename(StringRef(InputFiles[0]));
+ sys::path::replace_extension(OutputFile, ".obj");
}
if (Verbose) {
@@ -163,8 +163,7 @@ int main(int argc_, const char *argv_[]) {
WindowsResourceParser Parser;
for (const auto &File : InputFiles) {
- Expected<object::OwningBinary<object::Binary>> BinaryOrErr =
- object::createBinary(File);
+ Expected<OwningBinary<Binary>> BinaryOrErr = createBinary(File);
if (!BinaryOrErr)
reportError(File, errorToErrorCode(BinaryOrErr.takeError()));
@@ -193,7 +192,6 @@ int main(int argc_, const char *argv_[]) {
if (Verbose) {
Parser.printTree(outs());
- Parser.printTree(errs());
}
std::unique_ptr<MemoryBuffer> OutputBuffer;
@@ -209,8 +207,7 @@ int main(int argc_, const char *argv_[]) {
error(FileBuffer->commit());
if (Verbose) {
- Expected<object::OwningBinary<object::Binary>> BinaryOrErr =
- object::createBinary(OutputFile);
+ Expected<OwningBinary<Binary>> BinaryOrErr = createBinary(OutputFile);
if (!BinaryOrErr)
reportError(OutputFile, errorToErrorCode(BinaryOrErr.takeError()));
Binary &Binary = *BinaryOrErr.get().getBinary();
diff --git a/llvm/tools/llvm-cvtres/llvm-cvtres.h b/llvm/tools/llvm-cvtres/llvm-cvtres.h
deleted file mode 100644
index f7b14faeebe..00000000000
--- a/llvm/tools/llvm-cvtres/llvm-cvtres.h
+++ /dev/null
@@ -1,17 +0,0 @@
-//===- llvm-cvtres.h ------------------------------------------ *- C++ --*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_TOOLS_LLVMCVTRES_LLVMCVTRES_H
-#define LLVM_TOOLS_LLVMCVTRES_LLVMCVTRES_H
-
-#include <system_error>
-
-void error(std::error_code EC);
-
-#endif
OpenPOWER on IntegriCloud