Skip to content

Commit 8679b96

Browse files
committed
Update for sys::fs::OpenFlags LLVM API change
Update for LLVM commit 3302af9d4c39 ("Support: Remove F_{None,Text,Append} compatibility synonyms, NFC", 2021-06-15).
1 parent 390aba9 commit 8679b96

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/SPIRV/SPIRVReader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ static bool isKernel(SPIRVFunction *BF) {
117117

118118
static void dumpLLVM(Module *M, const std::string &FName) {
119119
std::error_code EC;
120-
raw_fd_ostream FS(FName, EC, sys::fs::F_None);
120+
raw_fd_ostream FS(FName, EC, sys::fs::OF_None);
121121
if (!EC) {
122122
FS << *M;
123123
FS.close();

lib/SPIRV/SPIRVUtil.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Value *removeCast(Value *V) {
100100

101101
void saveLLVMModule(Module *M, const std::string &OutputFile) {
102102
std::error_code EC;
103-
ToolOutputFile Out(OutputFile.c_str(), EC, sys::fs::F_None);
103+
ToolOutputFile Out(OutputFile.c_str(), EC, sys::fs::OF_None);
104104
if (EC) {
105105
SPIRVDBG(errs() << "Fails to open output file: " << EC.message();)
106106
return;

tools/llvm-spirv/llvm-spirv.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ static int convertSPIRVToLLVM(const SPIRV::TranslatorOpts &Opts) {
287287
}
288288

289289
std::error_code EC;
290-
ToolOutputFile Out(OutputFile.c_str(), EC, sys::fs::F_None);
290+
ToolOutputFile Out(OutputFile.c_str(), EC, sys::fs::OF_None);
291291
if (EC) {
292292
errs() << "Fails to open output file: " << EC.message();
293293
return -1;
@@ -364,7 +364,7 @@ static int regularizeLLVM(SPIRV::TranslatorOpts &Opts) {
364364
}
365365

366366
std::error_code EC;
367-
ToolOutputFile Out(OutputFile.c_str(), EC, sys::fs::F_None);
367+
ToolOutputFile Out(OutputFile.c_str(), EC, sys::fs::OF_None);
368368
if (EC) {
369369
errs() << "Fails to open output file: " << EC.message();
370370
return -1;

0 commit comments

Comments
 (0)