aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/DeltaAlgorithm.cpp
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2025-11-08 22:24:29 +0200
committerGitHub <noreply@github.com>2025-11-08 22:24:29 +0200
commit3673cc7a4222c6b60d8bb287ca048efa37f61e3b (patch)
tree28e4b1f885fb19fedbc13eb14b0a5bbfedeb8106 /llvm/lib/Support/DeltaAlgorithm.cpp
parentafc83688cfadfb07c1cd9edc4f3c855d7cf4a261 (diff)
downloadllvm-3673cc7a4222c6b60d8bb287ca048efa37f61e3b.zip
llvm-3673cc7a4222c6b60d8bb287ca048efa37f61e3b.tar.gz
llvm-3673cc7a4222c6b60d8bb287ca048efa37f61e3b.tar.bz2
[llvm-rc] Don't interpret integer literals as octal numbers in rc.exe mode (#166915)
It turns out that rc.exe doesn't interpret integer literals as octal numbers - but GNU windres does. Previously, llvm-rc did interpret them as octal. Fix the issue by stripping away the leading zeros during tokenization. The alternative (which would be somewhat cleaner, as visible in tokenizer.test) would be to retain them in the RCToken object, but strip them out before calling StringRef::getAsInteger. Alternatively to handle the radix detection locally in llvm-rc code and not rely on getAsInteger to autodetect it. Both of those solutions require propagating the IsWindres flag so that it is available within RCToken, or at least when calling RCToken::intValue(). Fixes: https://github.com/llvm/llvm-project/issues/144723
Diffstat (limited to 'llvm/lib/Support/DeltaAlgorithm.cpp')
0 files changed, 0 insertions, 0 deletions