[PATCH] D111437: [SystemZ/z/OS] Implement GOFF writer for empty files
Kai Nacke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 22 14:03:53 PST 2022
Kai added inline comments.
================
Comment at: llvm/lib/MC/MCGOFFStreamer.cpp:28-29
+ bool RelaxAll) {
+ MCGOFFStreamer *S =
+ new MCGOFFStreamer(Context, std::move(MAB), std::move(OW), std::move(CE));
+ if (RelaxAll)
----------------
jhenderson wrote:
> This seems like a memory leak?
Spontaneously I cannot say when the object will be released again. The code corresponds to all other Streamer implementations, e.g. `MCELFStreamer`.
IMHO it would be better to return a `std::unique_ptr<MCStreamer>`, but this also required global changes in the way how the object retrieved from the `TargetRegistry` is handled.
================
Comment at: llvm/test/MC/GOFF/empty-goff.s:2
+* RUN: llvm-mc <%s --triple s390x-ibm-zos --filetype=obj -o - | \
+* RUN: od -Ax -tx1 -v | FileCheck --ignore-case %s
+
----------------
jhenderson wrote:
> Why do you need the `--ignore-case` option?
The case of hexadecimal digits is not defined by the POSIX standard.
Consequently, Linux uses upper case digits, and the z/OS USS implementation uses lower case letters.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111437/new/
https://reviews.llvm.org/D111437
More information about the llvm-commits
mailing list