[llvm] [MC,ELF] Emit warning if a string constant contains newline char. (PR #98060)
Dmitriy Chestnykh via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 9 07:14:57 PDT 2024
================
@@ -613,7 +613,7 @@ bool DarwinAsmParser::parseDirectiveLinkerOption(StringRef IDVal, SMLoc) {
return TokError("expected string in '" + Twine(IDVal) + "' directive");
std::string Data;
- if (getParser().parseEscapedString(Data))
+ if (getParser().parseEscapedString(Data, false))
----------------
chestnykh wrote:
> No, I mean the warning should be issued for most/all of such directives, not only for .string/.ascii. Sorry if I wasn't clear.
No problem :)
my understanding was very close.
Okay, then i'm going to remove the second argument of `parseEscapedString` and emit warning unconditionally.
https://github.com/llvm/llvm-project/pull/98060
More information about the llvm-commits
mailing list