-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SystemZ][z/OS] Open YAML files for read as text files #121340
Conversation
@llvm/pr-subscribers-pgo @llvm/pr-subscribers-debuginfo Author: Zibi Sarbinowski (zibi2) ChangesThis patch makes sure YAML files are opened for reading as text file to trigger auto-conversion from EBCDIC encoding into expected ASCII encoding on z/OS platform. This is required to fix the following lit tests:
Full diff: https://github.com/llvm/llvm-project/pull/121340.diff 2 Files Affected:
diff --git a/llvm/lib/DebugInfo/GSYM/CallSiteInfo.cpp b/llvm/lib/DebugInfo/GSYM/CallSiteInfo.cpp
index 85b41e28991316..c112c0bc3ddc9d 100644
--- a/llvm/lib/DebugInfo/GSYM/CallSiteInfo.cpp
+++ b/llvm/lib/DebugInfo/GSYM/CallSiteInfo.cpp
@@ -151,7 +151,7 @@ LLVM_YAML_IS_SEQUENCE_VECTOR(FunctionYAML)
Error CallSiteInfoLoader::loadYAML(StringRef YAMLFile) {
// Step 1: Read YAML file
- auto BufferOrError = MemoryBuffer::getFile(YAMLFile);
+ auto BufferOrError = MemoryBuffer::getFile(YAMLFile, /*IsText=*/true);
if (!BufferOrError)
return errorCodeToError(BufferOrError.getError());
diff --git a/llvm/lib/ProfileData/MemProfReader.cpp b/llvm/lib/ProfileData/MemProfReader.cpp
index 10c36f25c4b795..6a4fecd5ae05e8 100644
--- a/llvm/lib/ProfileData/MemProfReader.cpp
+++ b/llvm/lib/ProfileData/MemProfReader.cpp
@@ -754,7 +754,7 @@ Error RawMemProfReader::readNextRecord(
Expected<std::unique_ptr<YAMLMemProfReader>>
YAMLMemProfReader::create(const Twine &Path) {
- auto BufferOr = MemoryBuffer::getFileOrSTDIN(Path);
+ auto BufferOr = MemoryBuffer::getFileOrSTDIN(Path, /*IsText=*/true);
if (std::error_code EC = BufferOr.getError())
return report(errorCodeToError(EC), Path.getSingleStringRef());
@@ -770,7 +770,7 @@ YAMLMemProfReader::create(std::unique_ptr<MemoryBuffer> Buffer) {
}
bool YAMLMemProfReader::hasFormat(const StringRef Path) {
- auto BufferOr = MemoryBuffer::getFileOrSTDIN(Path);
+ auto BufferOr = MemoryBuffer::getFileOrSTDIN(Path, /*IsText=*/true);
if (!BufferOr)
return false;
|
LGTM. Thanks for fixing ! |
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/23/builds/6219 Here is the relevant piece of the build log for the reference
|
Local branch amd-gfx ffd7301 Merged main:f0d60170cc50 into amd-gfx:9ec2e21f19dd Remote branch main 1d51546 [SystemZ][z/OS] Open YAML files for read as text files (llvm#121340)
This patch makes sure YAML files are opened for reading as text file to trigger auto-conversion from EBCDIC encoding into expected ASCII encoding on z/OS platform. This is required to fix the following lit tests: