[PATCH] D118077: Print C-string literals in mapfile
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 10 11:09:00 PST 2022
int3 accepted this revision.
int3 added a comment.
> This is because we no longer do any tail-merging, making offsets unnecessary.
I believe they're technically still possible, assuming the input is like
.ascii "non-null-terminated"
_foo:
.asciz "null-terminated
Probably unlikely to happen -- plus our current implementation doesn't really work when we have strings without corresponding symbols anyway -- but it wouldn't hurt to assert that the offset is indeed zero.
================
Comment at: lld/MachO/MapFile.cpp:85
+ // Output "literal string: <string literal>"
+ const auto *isec = &cast<CStringInputSection>(*sym->isec);
+ const StringPiece &piece = isec->getStringPiece(sym->value);
----------------
does this not work?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118077/new/
https://reviews.llvm.org/D118077
More information about the llvm-commits
mailing list