summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-09-23 01:03:17 +0000
committerReid Kleckner <rnk@google.com>2017-09-23 01:03:17 +0000
commit3fc649cb76f56da0ded256048de6dc634f03b502 (patch)
treea29d08e8d26ccc55ab05d98235f5c1027d912589 /llvm/lib
parent8e30a1c6072a9f922f37b3092a84eda279bb6a7b (diff)
downloadbcm5719-llvm-3fc649cb76f56da0ded256048de6dc634f03b502.tar.gz
bcm5719-llvm-3fc649cb76f56da0ded256048de6dc634f03b502.zip
[Support] Rename tool_output_file to ToolOutputFile, NFC
This class isn't similar to anything from the STL, so it shouldn't use the STL naming conventions. llvm-svn: 314050
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/LTO/LTO.cpp4
-rw-r--r--llvm/lib/LTO/LTOBackend.cpp2
-rw-r--r--llvm/lib/LTO/LTOCodeGenerator.cpp4
-rw-r--r--llvm/lib/Object/ArchiveWriter.cpp2
-rw-r--r--llvm/lib/Support/ToolOutputFile.cpp14
-rw-r--r--llvm/lib/TableGen/Main.cpp4
6 files changed, 15 insertions, 15 deletions
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp
index fad6d5ca006..4fb36e7998e 100644
--- a/llvm/lib/LTO/LTO.cpp
+++ b/llvm/lib/LTO/LTO.cpp
@@ -1166,7 +1166,7 @@ Error LTO::runThinLTO(AddStreamFn AddStream, NativeObjectCache Cache,
return BackendProc->wait();
}
-Expected<std::unique_ptr<tool_output_file>>
+Expected<std::unique_ptr<ToolOutputFile>>
lto::setupOptimizationRemarks(LLVMContext &Context,
StringRef LTORemarksFilename,
bool LTOPassRemarksWithHotness, int Count) {
@@ -1179,7 +1179,7 @@ lto::setupOptimizationRemarks(LLVMContext &Context,
std::error_code EC;
auto DiagnosticFile =
- llvm::make_unique<tool_output_file>(Filename, EC, sys::fs::F_None);
+ llvm::make_unique<ToolOutputFile>(Filename, EC, sys::fs::F_None);
if (EC)
return errorCodeToError(EC);
Context.setDiagnosticsOutputFile(
diff --git a/llvm/lib/LTO/LTOBackend.cpp b/llvm/lib/LTO/LTOBackend.cpp
index 5c113212041..501d6284117 100644
--- a/llvm/lib/LTO/LTOBackend.cpp
+++ b/llvm/lib/LTO/LTOBackend.cpp
@@ -349,7 +349,7 @@ Expected<const Target *> initAndLookupTarget(Config &C, Module &Mod) {
}
static void
-finalizeOptimizationRemarks(std::unique_ptr<tool_output_file> DiagOutputFile) {
+finalizeOptimizationRemarks(std::unique_ptr<ToolOutputFile> DiagOutputFile) {
// Make sure we flush the diagnostic remarks file in case the linker doesn't
// call the global destructors before exiting.
if (!DiagOutputFile)
diff --git a/llvm/lib/LTO/LTOCodeGenerator.cpp b/llvm/lib/LTO/LTOCodeGenerator.cpp
index ee9c70126b8..0e6c3edb140 100644
--- a/llvm/lib/LTO/LTOCodeGenerator.cpp
+++ b/llvm/lib/LTO/LTOCodeGenerator.cpp
@@ -225,7 +225,7 @@ bool LTOCodeGenerator::writeMergedModules(StringRef Path) {
// create output file
std::error_code EC;
- tool_output_file Out(Path, EC, sys::fs::F_None);
+ ToolOutputFile Out(Path, EC, sys::fs::F_None);
if (EC) {
std::string ErrMsg = "could not open bitcode file for writing: ";
ErrMsg += Path;
@@ -265,7 +265,7 @@ bool LTOCodeGenerator::compileOptimizedToFile(const char **Name) {
}
// generate object file
- tool_output_file objFile(Filename, FD);
+ ToolOutputFile objFile(Filename, FD);
bool genResult = compileOptimized(&objFile.os());
objFile.os().close();
diff --git a/llvm/lib/Object/ArchiveWriter.cpp b/llvm/lib/Object/ArchiveWriter.cpp
index 19a46c01c59..b36b256d446 100644
--- a/llvm/lib/Object/ArchiveWriter.cpp
+++ b/llvm/lib/Object/ArchiveWriter.cpp
@@ -394,7 +394,7 @@ Error llvm::writeArchive(StringRef ArcName,
TmpArchiveFD, TmpArchive))
return errorCodeToError(EC);
- tool_output_file Output(TmpArchive, TmpArchiveFD);
+ ToolOutputFile Output(TmpArchive, TmpArchiveFD);
raw_fd_ostream &Out = Output.os();
if (Thin)
Out << "!<thin>\n";
diff --git a/llvm/lib/Support/ToolOutputFile.cpp b/llvm/lib/Support/ToolOutputFile.cpp
index 8ae977db6a1..e12d9e824f7 100644
--- a/llvm/lib/Support/ToolOutputFile.cpp
+++ b/llvm/lib/Support/ToolOutputFile.cpp
@@ -1,4 +1,4 @@
-//===--- ToolOutputFile.cpp - Implement the tool_output_file class --------===//
+//===--- ToolOutputFile.cpp - Implement the ToolOutputFile class --------===//
//
// The LLVM Compiler Infrastructure
//
@@ -7,7 +7,7 @@
//
//===----------------------------------------------------------------------===//
//
-// This implements the tool_output_file class.
+// This implements the ToolOutputFile class.
//
//===----------------------------------------------------------------------===//
@@ -16,14 +16,14 @@
#include "llvm/Support/Signals.h"
using namespace llvm;
-tool_output_file::CleanupInstaller::CleanupInstaller(StringRef Filename)
+ToolOutputFile::CleanupInstaller::CleanupInstaller(StringRef Filename)
: Filename(Filename), Keep(false) {
// Arrange for the file to be deleted if the process is killed.
if (Filename != "-")
sys::RemoveFileOnSignal(Filename);
}
-tool_output_file::CleanupInstaller::~CleanupInstaller() {
+ToolOutputFile::CleanupInstaller::~CleanupInstaller() {
// Delete the file if the client hasn't told us not to.
if (!Keep && Filename != "-")
sys::fs::remove(Filename);
@@ -34,13 +34,13 @@ tool_output_file::CleanupInstaller::~CleanupInstaller() {
sys::DontRemoveFileOnSignal(Filename);
}
-tool_output_file::tool_output_file(StringRef Filename, std::error_code &EC,
- sys::fs::OpenFlags Flags)
+ToolOutputFile::ToolOutputFile(StringRef Filename, std::error_code &EC,
+ sys::fs::OpenFlags Flags)
: Installer(Filename), OS(Filename, EC, Flags) {
// If open fails, no cleanup is needed.
if (EC)
Installer.Keep = true;
}
-tool_output_file::tool_output_file(StringRef Filename, int FD)
+ToolOutputFile::ToolOutputFile(StringRef Filename, int FD)
: Installer(Filename), OS(FD, true) {}
diff --git a/llvm/lib/TableGen/Main.cpp b/llvm/lib/TableGen/Main.cpp
index 278b567fb22..fc9d0cc0888 100644
--- a/llvm/lib/TableGen/Main.cpp
+++ b/llvm/lib/TableGen/Main.cpp
@@ -61,7 +61,7 @@ static int createDependencyFile(const TGParser &Parser, const char *argv0) {
return reportError(argv0, "the option -d must be used together with -o\n");
std::error_code EC;
- tool_output_file DepOut(DependFilename, EC, sys::fs::F_Text);
+ ToolOutputFile DepOut(DependFilename, EC, sys::fs::F_Text);
if (EC)
return reportError(argv0, "error opening " + DependFilename + ":" +
EC.message() + "\n");
@@ -97,7 +97,7 @@ int llvm::TableGenMain(char *argv0, TableGenMainFn *MainFn) {
return 1;
std::error_code EC;
- tool_output_file Out(OutputFilename, EC, sys::fs::F_Text);
+ ToolOutputFile Out(OutputFilename, EC, sys::fs::F_Text);
if (EC)
return reportError(argv0, "error opening " + OutputFilename + ":" +
EC.message() + "\n");
OpenPOWER on IntegriCloud