aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-objdump
diff options
context:
space:
mode:
authorAbhina Sree <Abhina.Sreeskantharajan@ibm.com>2024-09-25 10:49:45 -0400
committerGitHub <noreply@github.com>2024-09-25 10:49:45 -0400
commit74dcf0b595d4d230f65a7bba7b0164c019d3c08b (patch)
tree924de8383ef7c022059fdefb26c1b2b0ee0f7177 /llvm/tools/llvm-objdump
parenta024a0ceedae886c254b496c9321f9ef253cd7f8 (diff)
downloadllvm-74dcf0b595d4d230f65a7bba7b0164c019d3c08b.zip
llvm-74dcf0b595d4d230f65a7bba7b0164c019d3c08b.tar.gz
llvm-74dcf0b595d4d230f65a7bba7b0164c019d3c08b.tar.bz2
[SystemZ][z/OS] Open text files in text mode (#109972)
This patch continues the work that was started here https://reviews.llvm.org/D99426 to correctly open text files in text mode.
Diffstat (limited to 'llvm/tools/llvm-objdump')
-rw-r--r--llvm/tools/llvm-objdump/SourcePrinter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/tools/llvm-objdump/SourcePrinter.cpp b/llvm/tools/llvm-objdump/SourcePrinter.cpp
index 7099390..600bd6a 100644
--- a/llvm/tools/llvm-objdump/SourcePrinter.cpp
+++ b/llvm/tools/llvm-objdump/SourcePrinter.cpp
@@ -344,7 +344,8 @@ bool SourcePrinter::cacheSource(const DILineInfo &LineInfo) {
if (LineInfo.Source) {
Buffer = MemoryBuffer::getMemBuffer(*LineInfo.Source);
} else {
- auto BufferOrError = MemoryBuffer::getFile(LineInfo.FileName);
+ auto BufferOrError =
+ MemoryBuffer::getFile(LineInfo.FileName, /*IsText=*/true);
if (!BufferOrError) {
if (MissingSources.insert(LineInfo.FileName).second)
reportWarning("failed to find source " + LineInfo.FileName,