[clang] 3b3accb - [SystemZ][z/OS] Propagate IsText flag continuation
Abhina Sreeskantharajan via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 19 12:16:22 PDT 2024
Author: Abhina Sreeskantharajan
Date: 2024-09-19T15:16:08-04:00
New Revision: 3b3accb598ec87a6a30b0e18ded06071030bb78f
URL: https://github.com/llvm/llvm-project/commit/3b3accb598ec87a6a30b0e18ded06071030bb78f
DIFF: https://github.com/llvm/llvm-project/commit/3b3accb598ec87a6a30b0e18ded06071030bb78f.diff
LOG: [SystemZ][z/OS] Propagate IsText flag continuation
Added:
Modified:
clang/lib/Serialization/ASTReader.cpp
llvm/lib/Support/FileCollector.cpp
Removed:
################################################################################
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index ad0551ee117a97..a8d073dee0246e 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -5318,7 +5318,7 @@ std::string ASTReader::getOriginalSourceFile(
// Open the AST file.
auto Buffer = FileMgr.getBufferForFile(ASTFileName, /*IsVolatile=*/false,
/*RequiresNullTerminator=*/false,
- /*IsText=*/true);
+ /*IsText=*/false);
if (!Buffer) {
Diags.Report(diag::err_fe_unable_to_read_pch_file)
<< ASTFileName << Buffer.getError().message();
diff --git a/llvm/lib/Support/FileCollector.cpp b/llvm/lib/Support/FileCollector.cpp
index fd4350da7f66a6..966c5ac90e9412 100644
--- a/llvm/lib/Support/FileCollector.cpp
+++ b/llvm/lib/Support/FileCollector.cpp
@@ -268,7 +268,7 @@ class FileCollectorFileSystem : public vfs::FileSystem {
}
llvm::ErrorOr<std::unique_ptr<llvm::vfs::File>>
- openFileForRead(const Twine &Path, bool IsText) override {
+ openFileForRead(const Twine &Path, bool IsText = true) override {
auto Result = FS->openFileForRead(Path, IsText);
if (Result && *Result)
Collector->addFile(Path);
More information about the cfe-commits
mailing list