SuccessChanges

Summary

  1. [NFC] Simplify msan test (details)
  2. [MC][ELF] Fix unused variable warning (NFC) (details)
  3. [AMDGPU] Temporary remove test (details)
  4. [MC][ELF] Fix gcc "enumeral and non-enumeral type in conditional expression" warning (NFC) (details)
  5. [libcxx] Implement append and operator/ properly for windows (details)
  6. [llvm-objdump] Map STT_TLS to ST_Other (previously ST_Data) (details)
  7. [profile] Make {__start_,__stop_}__llvm_prf_* symbols undefined weak (details)
  8. Add a new Row setting to mark all un-declared regs as Undefined (details)
  9. [CodeGen] Use ListSeparator (NFC) (details)
  10. [llvm] Ensure newlines at the end of files (NFC) (details)
  11. [CodeGen] Use range-based for loops (NFC) (details)
  12. [lldb][NFC] Silence missing case warnings in TypeSystemClang::GetTypeBitAlign due to new RISC-V V types (details)
  13. [WebAssembly][lld] --importTable flag only imports table if needed (details)
  14. [lld][WebAssembly] Fix resolveIndirectFunctionTable for relocatable output (details)
Commit 3afc8161b06529a38d24d6991b42cda1fba09a45 by Vitaly Buka
[NFC] Simplify msan test
The file was modifiedclang/test/Driver/msan.c
Commit 796feb61637c407aefcc0d462f24a1cc41f350d8 by nullptr.cpp
[MC][ELF] Fix unused variable warning (NFC)

GCC warning:
```
/llvm-project/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp: In member function ‘virtual llvm::MCSection* llvm::TargetLoweringObjectFileELF::getSectionForLSDA(const llvm::Function&, const llvm::MCSymbol&, const llvm::TargetMachine&) const’:
/llvm-project/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp:871:8: warning: variable ‘IsComdat’ set but not used [-Wunused-but-set-variable]
  871 |   bool IsComdat = false;
      |        ^~~~~~~~
```
The file was modifiedllvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
Commit 3d10ec0d6a7d0c8d9f7231e0adff4f156edf393a by Stanislav.Mekhanoshin
[AMDGPU] Temporary remove test

Remove hsa-gfx90a-v3.s until D95638. It unexpectedly passes
on s390x.
The file was removedllvm/test/MC/AMDGPU/hsa-gfx90a-v3.s
Commit 3ae27fca7ea584222bb93019d12bc79f2ada64f0 by nullptr.cpp
[MC][ELF] Fix gcc "enumeral and non-enumeral type in conditional expression" warning (NFC)

GCC warning:
```
/llvm-project/llvm/lib/MC/ELFObjectWriter.cpp: In member function ‘uint64_t {anonymous}::ELFWriter::writeObject(llvm::MCAssembler&, const llvm::MCAsmLayout&)’:
/llvm-project/llvm/lib/MC/ELFObjectWriter.cpp:1137:38: warning: enumeral and non-enumeral type in conditional expression [-Wextra]
1137 |     write(uint32_t(Group->isComdat() ? ELF::GRP_COMDAT : 0));
      |                    ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
```
The file was modifiedllvm/lib/MC/ELFObjectWriter.cpp
Commit 78d693faecf98718dadfa6e39f291e5999f380c7 by martin
[libcxx] Implement append and operator/ properly for windows

The root_path function has to be changed to return the parsed bit
as-is; otherwise a path like "//net" gets a root path of "//net/", as
the root name, "//net", gets the root directory (an empty string) appended,
forming "//net/". (The same doesn't happen for the root dir "c:" though.)

Differential Revision: https://reviews.llvm.org/D91178
The file was modifiedlibcxx/test/std/input.output/filesystems/class.path/path.member/path.append.pass.cpp
The file was modifiedlibcxx/include/filesystem
Commit 018a484cd26d72fb4c9e7fd75e5f5bc7838dfc73 by i
[llvm-objdump] Map STT_TLS to ST_Other (previously ST_Data)

ST_Data is used to model BFD `BFD_OBJECT`.
A STT_TLS symbol does not have the `BFD_OBJECT` flag in BFD.
This makes sense because a STT_TLS symbol is like in a different address space,
normal data/object properties do not apply on them.

With this change, a STT_TLS symbol will not be displayed as 'O'.
This new behavior matches objdump.

Differential Revision: https://reviews.llvm.org/D96735
The file was modifiedlld/test/ELF/mips-tls.s
The file was modifiedllvm/test/tools/llvm-objdump/ELF/symbol-table.test
The file was modifiedlld/test/ELF/mips-tls-static-64.s
The file was modifiedlld/test/ELF/mips-tls-64.s
The file was modifiedlld/test/ELF/mips-tls-static.s
The file was modifiedlld/test/ELF/mips-mgot.s
The file was modifiedllvm/include/llvm/Object/ELFObjectFile.h
The file was modifiedlld/test/ELF/mips-tls-hilo.s
Commit 833d4d8e89e93636e904c3aa52a6c9c8d2ca098f by i
[profile] Make {__start_,__stop_}__llvm_prf_* symbols undefined weak

To make a kind of metadata section usage work, we want to drop the
`__start_/__stop_ references retain C identifier name sections` rule from LLD (see D96914).

If an application has no `__llvm_prf_data` input section surviving --gc-sections,
LLD will error for undefined hidden `{__start_,__stop_}__llvm_prf_*` from `libclang_rt.profile-*`.
Other `__llvm_prf_*` sections have similar issues.

Making the references weak can address the problem.
This probably enables the opportunity to drop zero size dummy sections in `InstrProfilingPlatformLinux.c`.

Reviewed By: davidxl

Differential Revision: https://reviews.llvm.org/D96936
The file was modifiedcompiler-rt/lib/profile/InstrProfilingPlatformLinux.c
Commit fcdef15d77bde8a200cd28242077cd2496f138a4 by Jason Molenda
Add a new Row setting to mark all un-declared regs as Undefined

Add a new state for UnwindPlan::Row which indicates that any
register not listed is not defined, and should not be found in
stack frames newer than this one and passed up the stack.  Mostly
intended for use with architectural default unwind plans that are
used for jitted stack frames, where we have no unwind information
or start address.  lldb has no way to tell if registers were
spilled in the jitted frame & overwritten, so passing register
values up the stack is not safe to show the user.

Architectural default unwind plans are also used as a fast unwind
plan on x86_64 in particular, and are used as the fallback unwind
plans when lldb thinks it may be able to work around a problem
which causes the unwinder to stop walking the stack early.

For fast unwind plans, when we don't find a register location in
the arch default unwind plan, we fall back to computing & using
the full unwind plan. One small part of this patch is to know that
a register marked as Undefined in the fast unwind plan is a special
case, and we should continue on to the full unwind plan to find what
the real unwind rule is for this register.

Differential Revision: https://reviews.llvm.org/D96829
<rdar://problem/70398009>
The file was modifiedlldb/source/Symbol/UnwindPlan.cpp
The file was modifiedlldb/source/Plugins/ABI/X86/ABISysV_x86_64.cpp
The file was modifiedlldb/source/Plugins/ABI/Mips/ABISysV_mips64.cpp
The file was modifiedlldb/source/Plugins/ABI/PowerPC/ABISysV_ppc.cpp
The file was modifiedlldb/source/Plugins/ABI/PowerPC/ABISysV_ppc64.cpp
The file was modifiedlldb/source/Plugins/ABI/ARM/ABISysV_arm.cpp
The file was modifiedlldb/include/lldb/Symbol/UnwindPlan.h
The file was modifiedlldb/source/Plugins/ABI/Hexagon/ABISysV_hexagon.cpp
The file was modifiedlldb/source/Target/RegisterContextUnwind.cpp
The file was modifiedlldb/source/Plugins/ABI/X86/ABIWindows_x86_64.cpp
The file was modifiedlldb/source/Plugins/ABI/X86/ABIMacOSX_i386.cpp
The file was modifiedlldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.cpp
The file was modifiedlldb/source/Plugins/ABI/X86/ABISysV_i386.cpp
The file was modifiedlldb/source/Plugins/ABI/Mips/ABISysV_mips.cpp
The file was modifiedlldb/source/Plugins/ABI/ARM/ABIMacOSX_arm.cpp
The file was modifiedlldb/source/Plugins/ABI/AArch64/ABISysV_arm64.cpp
Commit 8e13bbca0883d617156c9e09ddf46bfb5739f2cd by kazu
[CodeGen] Use ListSeparator (NFC)
The file was modifiedllvm/lib/CodeGen/GCMetadata.cpp
Commit e54579307b15ac0adfe96c5422e9cdd228ed1a76 by kazu
[llvm] Ensure newlines at the end of files (NFC)

This patch eliminates pesky "No newline at end of file" messages from
git diff.
The file was modifiedllvm/lib/Analysis/TypeBasedAliasAnalysis.cpp
The file was modifiedllvm/lib/Support/SHA256.cpp
Commit 61efa3d93f733c6310abf079cd27f99868c38461 by kazu
[CodeGen] Use range-based for loops (NFC)
The file was modifiedllvm/lib/CodeGen/RegAllocBasic.cpp
The file was modifiedllvm/lib/CodeGen/RDFGraph.cpp
The file was modifiedllvm/lib/CodeGen/PrologEpilogInserter.cpp
The file was modifiedllvm/lib/CodeGen/OptimizePHIs.cpp
The file was modifiedllvm/lib/CodeGen/ProcessImplicitDefs.cpp
The file was modifiedllvm/lib/CodeGen/RegAllocFast.cpp
The file was modifiedllvm/lib/CodeGen/RegAllocGreedy.cpp
The file was modifiedllvm/lib/CodeGen/MachineSink.cpp
Commit fb1dc77bfd24c32a5231face77e0bc4323b67c68 by Raphael Isemann
[lldb][NFC] Silence missing case warnings in TypeSystemClang::GetTypeBitAlign due to new RISC-V V types

Those types were added in D92715. This just silences the warning but doesn't
actually add support for those types to LLDB.
The file was modifiedlldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
Commit f48923e884611e6271a8da821a58aedd24d91cf7 by wingo
[WebAssembly][lld] --importTable flag only imports table if needed

Before, --importTable forced the creation of an indirect function table,
whether it was needed or not.  Now it only imports a table if needed.

Differential Revision: https://reviews.llvm.org/D96872
The file was modifiedlld/wasm/Driver.cpp
The file was modifiedlld/test/wasm/import-table.test
Commit 48219d06b1de6023a6b9dc8c137fdbc0d7089514 by wingo
[lld][WebAssembly] Fix resolveIndirectFunctionTable for relocatable output

For relocatable output that needs the indirect function table, identify
the well-known function table.  This allows us to properly fix the
limits on the imported table, and in a followup will allow the element
section to reference the indirect function table even if it's not
assigned to table number 0.  Adapt tests for import reordering.

Differential Revision: https://reviews.llvm.org/D96770
The file was modifiedlld/test/wasm/weak-alias.ll
The file was modifiedlld/test/wasm/relocatable.ll
The file was modifiedlld/test/wasm/locals-duplicate.test
The file was modifiedlld/wasm/Driver.cpp
The file was addedlld/test/wasm/relocatable-options.test