Skip to content

Commit

Permalink
Rename F_{None,Text,Append} to OF_{None,Text,Append}. NFC
Browse files Browse the repository at this point in the history
F_{None,Text,Append} are kept for compatibility since r334221.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367800 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
MaskRay committed Aug 5, 2019
1 parent 8c95fcc commit 2ffd083
Show file tree
Hide file tree
Showing 69 changed files with 105 additions and 104 deletions.
2 changes: 1 addition & 1 deletion docs/tutorial/MyFirstLanguageFrontend/LangImpl08.rst
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ our file to:

auto Filename = "output.o";
std::error_code EC;
raw_fd_ostream dest(Filename, EC, sys::fs::F_None);
raw_fd_ostream dest(Filename, EC, sys::fs::OF_None);

if (EC) {
errs() << "Could not open file: " << EC.message();
Expand Down
2 changes: 1 addition & 1 deletion examples/BrainF/BrainFDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ int main(int argc, char **argv) {
}
if (OutputFilename != "-") {
std::error_code EC;
out = new raw_fd_ostream(OutputFilename, EC, sys::fs::F_None);
out = new raw_fd_ostream(OutputFilename, EC, sys::fs::OF_None);
}
}

Expand Down
2 changes: 1 addition & 1 deletion examples/Kaleidoscope/Chapter8/toy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,7 @@ int main() {

auto Filename = "output.o";
std::error_code EC;
raw_fd_ostream dest(Filename, EC, sys::fs::F_None);
raw_fd_ostream dest(Filename, EC, sys::fs::OF_None);

if (EC) {
errs() << "Could not open file: " << EC.message();
Expand Down
4 changes: 2 additions & 2 deletions include/llvm/Analysis/DOTGraphTraitsPass.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class DOTGraphTraitsPrinter : public FunctionPass {

errs() << "Writing '" << Filename << "'...";

raw_fd_ostream File(Filename, EC, sys::fs::F_Text);
raw_fd_ostream File(Filename, EC, sys::fs::OF_Text);
std::string GraphName = DOTGraphTraits<GraphT>::getGraphName(Graph);
std::string Title = GraphName + " for '" + F.getName().str() + "' function";

Expand Down Expand Up @@ -162,7 +162,7 @@ class DOTGraphTraitsModulePrinter : public ModulePass {

errs() << "Writing '" << Filename << "'...";

raw_fd_ostream File(Filename, EC, sys::fs::F_Text);
raw_fd_ostream File(Filename, EC, sys::fs::OF_Text);
std::string Title = DOTGraphTraits<GraphT>::getGraphName(Graph);

if (!EC)
Expand Down
2 changes: 1 addition & 1 deletion lib/Analysis/CFGPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ static void writeCFGToDotFile(Function &F, bool CFGOnly = false) {
errs() << "Writing '" << Filename << "'...";

std::error_code EC;
raw_fd_ostream File(Filename, EC, sys::fs::F_Text);
raw_fd_ostream File(Filename, EC, sys::fs::OF_Text);

if (!EC)
WriteGraph(File, (const Function*)&F, CFGOnly);
Expand Down
2 changes: 1 addition & 1 deletion lib/Analysis/ModuleSummaryAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ ModuleSummaryIndex llvm::buildModuleSummaryIndex(

if (!ModuleSummaryDotFile.empty()) {
std::error_code EC;
raw_fd_ostream OSDot(ModuleSummaryDotFile, EC, sys::fs::OpenFlags::F_None);
raw_fd_ostream OSDot(ModuleSummaryDotFile, EC, sys::fs::OpenFlags::OF_None);
if (EC)
report_fatal_error(Twine("Failed to open dot file ") +
ModuleSummaryDotFile + ": " + EC.message() + "\n");
Expand Down
2 changes: 1 addition & 1 deletion lib/Bitcode/Writer/BitWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ using namespace llvm;

int LLVMWriteBitcodeToFile(LLVMModuleRef M, const char *Path) {
std::error_code EC;
raw_fd_ostream OS(Path, EC, sys::fs::F_None);
raw_fd_ostream OS(Path, EC, sys::fs::OF_None);

if (EC)
return -1;
Expand Down
2 changes: 1 addition & 1 deletion lib/CodeGen/RegAllocPBQP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ bool RegAllocPBQP::runOnMachineFunction(MachineFunction &MF) {
std::string GraphFileName = FullyQualifiedName + "." + RS.str() +
".pbqpgraph";
std::error_code EC;
raw_fd_ostream OS(GraphFileName, EC, sys::fs::F_Text);
raw_fd_ostream OS(GraphFileName, EC, sys::fs::OF_Text);
LLVM_DEBUG(dbgs() << "Dumping graph for round " << Round << " to \""
<< GraphFileName << "\"\n");
G.dump(OS);
Expand Down
2 changes: 1 addition & 1 deletion lib/IR/Core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ void LLVMDumpModule(LLVMModuleRef M) {
LLVMBool LLVMPrintModuleToFile(LLVMModuleRef M, const char *Filename,
char **ErrorMessage) {
std::error_code EC;
raw_fd_ostream dest(Filename, EC, sys::fs::F_Text);
raw_fd_ostream dest(Filename, EC, sys::fs::OF_Text);
if (EC) {
*ErrorMessage = strdup(EC.message().c_str());
return true;
Expand Down
2 changes: 1 addition & 1 deletion lib/IR/RemarkStreamer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ llvm::setupOptimizationRemarks(LLVMContext &Context, StringRef RemarksFilename,

std::error_code EC;
auto RemarksFile =
llvm::make_unique<ToolOutputFile>(RemarksFilename, EC, sys::fs::F_None);
llvm::make_unique<ToolOutputFile>(RemarksFilename, EC, sys::fs::OF_None);
// We don't use llvm::FileError here because some diagnostics want the file
// name separately.
if (EC)
Expand Down
4 changes: 2 additions & 2 deletions lib/LTO/LTO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1205,7 +1205,7 @@ class WriteIndexesThinBackend : public ThinBackendProc {

std::error_code EC;
raw_fd_ostream OS(NewModulePath + ".thinlto.bc", EC,
sys::fs::OpenFlags::F_None);
sys::fs::OpenFlags::OF_None);
if (EC)
return errorCodeToError(EC);
WriteIndexToFile(CombinedIndex, OS, &ModuleToSummariesForIndex);
Expand Down Expand Up @@ -1382,7 +1382,7 @@ lto::setupStatsFile(StringRef StatsFilename) {
llvm::EnableStatistics(false);
std::error_code EC;
auto StatsFile =
llvm::make_unique<ToolOutputFile>(StatsFilename, EC, sys::fs::F_None);
llvm::make_unique<ToolOutputFile>(StatsFilename, EC, sys::fs::OF_None);
if (EC)
return errorCodeToError(EC);

Expand Down
10 changes: 5 additions & 5 deletions lib/LTO/LTOBackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Error Config::addSaveTemps(std::string OutputFileName,

std::error_code EC;
ResolutionFile = llvm::make_unique<raw_fd_ostream>(
OutputFileName + "resolution.txt", EC, sys::fs::OpenFlags::F_Text);
OutputFileName + "resolution.txt", EC, sys::fs::OpenFlags::OF_Text);
if (EC)
return errorCodeToError(EC);

Expand All @@ -83,7 +83,7 @@ Error Config::addSaveTemps(std::string OutputFileName,
PathPrefix = M.getModuleIdentifier() + ".";
std::string Path = PathPrefix + PathSuffix + ".bc";
std::error_code EC;
raw_fd_ostream OS(Path, EC, sys::fs::OpenFlags::F_None);
raw_fd_ostream OS(Path, EC, sys::fs::OpenFlags::OF_None);
// Because -save-temps is a debugging feature, we report the error
// directly and exit.
if (EC)
Expand All @@ -103,15 +103,15 @@ Error Config::addSaveTemps(std::string OutputFileName,
CombinedIndexHook = [=](const ModuleSummaryIndex &Index) {
std::string Path = OutputFileName + "index.bc";
std::error_code EC;
raw_fd_ostream OS(Path, EC, sys::fs::OpenFlags::F_None);
raw_fd_ostream OS(Path, EC, sys::fs::OpenFlags::OF_None);
// Because -save-temps is a debugging feature, we report the error
// directly and exit.
if (EC)
reportOpenError(Path, EC.message());
WriteIndexToFile(Index, OS);

Path = OutputFileName + "index.dot";
raw_fd_ostream OSDot(Path, EC, sys::fs::OpenFlags::F_None);
raw_fd_ostream OSDot(Path, EC, sys::fs::OpenFlags::OF_None);
if (EC)
reportOpenError(Path, EC.message());
Index.exportToDot(OSDot);
Expand Down Expand Up @@ -329,7 +329,7 @@ void codegen(Config &Conf, TargetMachine *TM, AddStreamFn AddStream,

if (!DwoFile.empty()) {
std::error_code EC;
DwoOut = llvm::make_unique<ToolOutputFile>(DwoFile, EC, sys::fs::F_None);
DwoOut = llvm::make_unique<ToolOutputFile>(DwoFile, EC, sys::fs::OF_None);
if (EC)
report_fatal_error("Failed to open " + DwoFile + ": " + EC.message());
}
Expand Down
2 changes: 1 addition & 1 deletion lib/LTO/LTOCodeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ bool LTOCodeGenerator::writeMergedModules(StringRef Path) {

// create output file
std::error_code EC;
ToolOutputFile Out(Path, EC, sys::fs::F_None);
ToolOutputFile Out(Path, EC, sys::fs::OF_None);
if (EC) {
std::string ErrMsg = "could not open bitcode file for writing: ";
ErrMsg += Path.str() + ": " + EC.message();
Expand Down
6 changes: 3 additions & 3 deletions lib/LTO/ThinLTOCodeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ static void saveTempBitcode(const Module &TheModule, StringRef TempDir,
// User asked to save temps, let dump the bitcode file after import.
std::string SaveTempPath = (TempDir + llvm::Twine(count) + Suffix).str();
std::error_code EC;
raw_fd_ostream OS(SaveTempPath, EC, sys::fs::F_None);
raw_fd_ostream OS(SaveTempPath, EC, sys::fs::OF_None);
if (EC)
report_fatal_error(Twine("Failed to open ") + SaveTempPath +
" to save optimized bitcode\n");
Expand Down Expand Up @@ -845,7 +845,7 @@ ThinLTOCodeGenerator::writeGeneratedObject(int count, StringRef CacheEntryPath,
}
// No cache entry, just write out the buffer.
std::error_code Err;
raw_fd_ostream OS(OutputPath, Err, sys::fs::F_None);
raw_fd_ostream OS(OutputPath, Err, sys::fs::OF_None);
if (Err)
report_fatal_error("Can't open output '" + OutputPath + "'\n");
OS << OutputBuffer.getBuffer();
Expand Down Expand Up @@ -900,7 +900,7 @@ void ThinLTOCodeGenerator::run() {
if (!SaveTempsDir.empty()) {
auto SaveTempPath = SaveTempsDir + "index.bc";
std::error_code EC;
raw_fd_ostream OS(SaveTempPath, EC, sys::fs::F_None);
raw_fd_ostream OS(SaveTempPath, EC, sys::fs::OF_None);
if (EC)
report_fatal_error(Twine("Failed to open ") + SaveTempPath +
" to save optimized bitcode\n");
Expand Down
2 changes: 1 addition & 1 deletion lib/MC/MCParser/DarwinAsmParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ bool DarwinAsmParser::parseDirectiveSecureLogUnique(StringRef, SMLoc IDLoc) {
if (!OS) {
std::error_code EC;
auto NewOS = llvm::make_unique<raw_fd_ostream>(
StringRef(SecureLogFile), EC, sys::fs::F_Append | sys::fs::F_Text);
StringRef(SecureLogFile), EC, sys::fs::OF_Append | sys::fs::OF_Text);
if (EC)
return Error(IDLoc, Twine("can't open secure log file: ") +
SecureLogFile + " (" + EC.message() + ")");
Expand Down
2 changes: 1 addition & 1 deletion lib/ProfileData/GCOV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ FileInfo::openCoveragePath(StringRef CoveragePath) {

std::error_code EC;
auto OS =
llvm::make_unique<raw_fd_ostream>(CoveragePath, EC, sys::fs::F_Text);
llvm::make_unique<raw_fd_ostream>(CoveragePath, EC, sys::fs::OF_Text);
if (EC) {
errs() << EC.message() << "\n";
return llvm::make_unique<raw_null_ostream>();
Expand Down
4 changes: 2 additions & 2 deletions lib/ProfileData/SampleProfWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,9 @@ SampleProfileWriter::create(StringRef Filename, SampleProfileFormat Format) {
std::error_code EC;
std::unique_ptr<raw_ostream> OS;
if (Format == SPF_Binary || Format == SPF_Compact_Binary)
OS.reset(new raw_fd_ostream(Filename, EC, sys::fs::F_None));
OS.reset(new raw_fd_ostream(Filename, EC, sys::fs::OF_None));
else
OS.reset(new raw_fd_ostream(Filename, EC, sys::fs::F_Text));
OS.reset(new raw_fd_ostream(Filename, EC, sys::fs::OF_Text));
if (EC)
return EC;

Expand Down
2 changes: 1 addition & 1 deletion lib/Support/CachePruning.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ struct FileInfo {
/// interval option.
static void writeTimestampFile(StringRef TimestampFile) {
std::error_code EC;
raw_fd_ostream Out(TimestampFile.str(), EC, sys::fs::F_None);
raw_fd_ostream Out(TimestampFile.str(), EC, sys::fs::OF_None);
}

static Expected<std::chrono::seconds> parseDuration(StringRef Duration) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Support/CodeGenCoverage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ bool CodeGenCoverage::emit(StringRef CoveragePrefix,
std::string CoverageFilename = (CoveragePrefix + Pid).str();

std::error_code EC;
sys::fs::OpenFlags OpenFlags = sys::fs::F_Append;
sys::fs::OpenFlags OpenFlags = sys::fs::OF_Append;
std::unique_ptr<ToolOutputFile> CoverageFile =
llvm::make_unique<ToolOutputFile>(CoverageFilename, EC, OpenFlags);
if (EC)
Expand Down
2 changes: 1 addition & 1 deletion lib/Support/FileCollector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ std::error_code FileCollector::writeMapping(StringRef mapping_file) {
VFSWriter.setUseExternalNames(false);

std::error_code EC;
raw_fd_ostream os(mapping_file, EC, sys::fs::F_Text);
raw_fd_ostream os(mapping_file, EC, sys::fs::OF_Text);
if (EC)
return EC;

Expand Down
2 changes: 1 addition & 1 deletion lib/Support/Timer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ std::unique_ptr<raw_fd_ostream> llvm::CreateInfoOutputFile() {
// info output file before running commands which write to it.
std::error_code EC;
auto Result = llvm::make_unique<raw_fd_ostream>(
OutputFilename, EC, sys::fs::F_Append | sys::fs::F_Text);
OutputFilename, EC, sys::fs::OF_Append | sys::fs::OF_Text);
if (!EC)
return Result;

Expand Down
6 changes: 3 additions & 3 deletions lib/Support/Unix/Path.inc
Original file line number Diff line number Diff line change
Expand Up @@ -887,9 +887,9 @@ static int nativeOpenFlags(CreationDisposition Disp, OpenFlags Flags,
else if (Access == (FA_Read | FA_Write))
Result |= O_RDWR;

// This is for compatibility with old code that assumed F_Append implied
// This is for compatibility with old code that assumed OF_Append implied
// would open an existing file. See Windows/Path.inc for a longer comment.
if (Flags & F_Append)
if (Flags & OF_Append)
Disp = CD_OpenAlways;

if (Disp == CD_CreateNew) {
Expand All @@ -904,7 +904,7 @@ static int nativeOpenFlags(CreationDisposition Disp, OpenFlags Flags,
// Nothing special, just don't add O_CREAT and we get these semantics.
}

if (Flags & F_Append)
if (Flags & OF_Append)
Result |= O_APPEND;

#ifdef O_CLOEXEC
Expand Down
2 changes: 1 addition & 1 deletion lib/Support/Unix/Program.inc
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ std::error_code
llvm::sys::writeFileWithEncoding(StringRef FileName, StringRef Contents,
WindowsEncodingMethod Encoding /*unused*/) {
std::error_code EC;
llvm::raw_fd_ostream OS(FileName, EC, llvm::sys::fs::OpenFlags::F_Text);
llvm::raw_fd_ostream OS(FileName, EC, llvm::sys::fs::OpenFlags::OF_Text);

if (EC)
return EC;
Expand Down
2 changes: 1 addition & 1 deletion lib/Support/Windows/Program.inc
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ std::error_code
llvm::sys::writeFileWithEncoding(StringRef FileName, StringRef Contents,
WindowsEncodingMethod Encoding) {
std::error_code EC;
llvm::raw_fd_ostream OS(FileName, EC, llvm::sys::fs::F_Text);
llvm::raw_fd_ostream OS(FileName, EC, llvm::sys::fs::OF_Text);
if (EC)
return EC;

Expand Down
2 changes: 1 addition & 1 deletion lib/Support/raw_ostream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ void raw_fd_ostream::anchor() {}
raw_ostream &llvm::outs() {
// Set buffer settings to model stdout behavior.
std::error_code EC;
static raw_fd_ostream S("-", EC, sys::fs::F_None);
static raw_fd_ostream S("-", EC, sys::fs::OF_None);
assert(!EC);
return S;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/TableGen/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,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;
ToolOutputFile DepOut(DependFilename, EC, sys::fs::F_Text);
ToolOutputFile DepOut(DependFilename, EC, sys::fs::OF_Text);
if (EC)
return reportError(argv0, "error opening " + DependFilename + ":" +
EC.message() + "\n");
Expand Down Expand Up @@ -122,7 +122,7 @@ int llvm::TableGenMain(char *argv0, TableGenMainFn *MainFn) {
return 0;

std::error_code EC;
ToolOutputFile OutFile(OutputFilename, EC, sys::fs::F_Text);
ToolOutputFile OutFile(OutputFilename, EC, sys::fs::OF_Text);
if (EC)
return reportError(argv0, "error opening " + OutputFilename + ":" +
EC.message() + "\n");
Expand Down
2 changes: 1 addition & 1 deletion lib/Target/TargetMachineC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ static LLVMBool LLVMTargetMachineEmit(LLVMTargetMachineRef T, LLVMModuleRef M,
LLVMBool LLVMTargetMachineEmitToFile(LLVMTargetMachineRef T, LLVMModuleRef M,
char* Filename, LLVMCodeGenFileType codegen, char** ErrorMessage) {
std::error_code EC;
raw_fd_ostream dest(Filename, EC, sys::fs::F_None);
raw_fd_ostream dest(Filename, EC, sys::fs::OF_None);
if (EC) {
*ErrorMessage = strdup(EC.message().c_str());
return true;
Expand Down
2 changes: 1 addition & 1 deletion lib/Transforms/IPO/FunctionImport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ std::error_code llvm::EmitImportsFiles(
StringRef ModulePath, StringRef OutputFilename,
const std::map<std::string, GVSummaryMapTy> &ModuleToSummariesForIndex) {
std::error_code EC;
raw_fd_ostream ImportsOS(OutputFilename, EC, sys::fs::OpenFlags::F_None);
raw_fd_ostream ImportsOS(OutputFilename, EC, sys::fs::OpenFlags::OF_None);
if (EC)
return EC;
for (auto &ILI : ModuleToSummariesForIndex)
Expand Down
2 changes: 1 addition & 1 deletion lib/Transforms/IPO/LowerTypeTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1630,7 +1630,7 @@ bool LowerTypeTestsModule::runForTesting(Module &M) {
ExitOnError ExitOnErr("-lowertypetests-write-summary: " + ClWriteSummary +
": ");
std::error_code EC;
raw_fd_ostream OS(ClWriteSummary, EC, sys::fs::F_Text);
raw_fd_ostream OS(ClWriteSummary, EC, sys::fs::OF_Text);
ExitOnErr(errorCodeToError(EC));

yaml::Output Out(OS);
Expand Down
2 changes: 1 addition & 1 deletion lib/Transforms/IPO/WholeProgramDevirt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ bool DevirtModule::runForTesting(
ExitOnError ExitOnErr(
"-wholeprogramdevirt-write-summary: " + ClWriteSummary + ": ");
std::error_code EC;
raw_fd_ostream OS(ClWriteSummary, EC, sys::fs::F_Text);
raw_fd_ostream OS(ClWriteSummary, EC, sys::fs::OF_Text);
ExitOnErr(errorCodeToError(EC));

yaml::Output Out(OS);
Expand Down
3 changes: 2 additions & 1 deletion lib/Transforms/Instrumentation/GCOVProfiling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,8 @@ void GCOVProfiler::emitProfileNotes() {
continue;

std::error_code EC;
raw_fd_ostream out(mangleName(CU, GCovFileType::GCNO), EC, sys::fs::F_None);
raw_fd_ostream out(mangleName(CU, GCovFileType::GCNO), EC,
sys::fs::OF_None);
if (EC) {
Ctx->emitError(Twine("failed to open coverage notes file for writing: ") +
EC.message());
Expand Down
3 changes: 2 additions & 1 deletion lib/Transforms/Instrumentation/InstrOrderFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ struct InstrOrderFile {
if (!ClOrderFileWriteMapping.empty()) {
std::lock_guard<std::mutex> LogLock(MappingMutex);
std::error_code EC;
llvm::raw_fd_ostream OS(ClOrderFileWriteMapping, EC, llvm::sys::fs::F_Append);
llvm::raw_fd_ostream OS(ClOrderFileWriteMapping, EC,
llvm::sys::fs::OF_Append);
if (EC) {
report_fatal_error(Twine("Failed to open ") + ClOrderFileWriteMapping +
" to save mapping file for order file instrumentation\n");
Expand Down
2 changes: 1 addition & 1 deletion tools/bugpoint/OptimizerDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ bool BugDriver::writeProgramToFile(int FD, const Module &M) const {
bool BugDriver::writeProgramToFile(const std::string &Filename,
const Module &M) const {
std::error_code EC;
ToolOutputFile Out(Filename, EC, sys::fs::F_None);
ToolOutputFile Out(Filename, EC, sys::fs::OF_None);
if (!EC)
return writeProgramToFileAux(Out, M);
return true;
Expand Down
Loading

0 comments on commit 2ffd083

Please sign in to comment.