[llvm] Allow Rust personality name to contain arbitrary prefix (#166095)
LLVM needs to figure out the type of EH personality for various reasons.
To do this, it currently matches against a hardcoded list of names. In
Rust, we would like to mangle our personality function to better support
linking multiple Rust standard libraries via staticlib. We have
currently mangled all symbols except the personality, which remains
unmangled because of this LLVM hardcoding.
Instead, this now does a suffix match of the personality name, which
will work with the mangling scheme used for these internal symbols (e.g.
`_RNvCseCSg29WUqSe_7___rustc12___rust_alloc`).
Companion Rust PR: https://github.com/rust-lang/rust/pull/148413
[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
[libc++abi][libunwind] Enable AT&T syntax explicitly (#166818)
Implementation files using the Intel syntax typically explicitly specify
it. Do the same for the few files where applicable for AT&T.
This enables building LLVM with `-mllvm -x86-asm-syntax=intel` in one's
Clang config files (i.e. a global preference for Intel syntax).
[libc++] Run macOS buildbot under xcrun (#167072)
This ensures that run-buildbot can find the appropriate build tools
without having to go through a bunch of hoops inside run-buildbot
itself. When we eventually run the bootstrapping build on macOS, it also
allows the bootstrapped Clang to find the SDK headers it requires.
This also allows simplifying run-buildbot a bunch since we should be
able to find build tools in the current $PATH.
[Driver] Remove extraneous c_str() (NFC) (#167156)
Note that addMultilibFlag takes StringRef for its second parameter.
Identified with readability-redundant-string-cstr.
[WebAssembly] Clean up CustomMappingTraits<BBNumberMap> (NFC) (#167155)
This patch does two things for readability:
- Use structured bindings.
- Remove extraneous .c_str().
Note that YamlIO.mapRequired takes StringRef as the key type. As
such, we can implicitly construct StringRef from std::string.
[ObjectYAML] Remove redundant .str().c_str() (NFC) (#167154)
We can drop .str().c_str() here because all of the following are of
type StringRef:
- E.Name
- the second parameter of llvm::yaml::IO::enumCase
- the second parameter of llvm::yaml::IO::bitSetCase
Identified with readability-redundant-string-cstr.
[NVPTX] Remove redundant declarations (NFC) (#167153)
initializeNVPTXCtorDtorLoweringLegacyPass is declared twice in
NVPTX.h.
initializeGenericToNVVMLegacyPassPass is declared in NVPTX.h.
Identified with readability-redundant-declaration.
[llvm] Proofread *.rst (#167108)
This patch is limited to single-word replacements to fix spelling
and/or grammar to ease the review process. Punctuation and markdown
fixes are specifically excluded.