SuccessChanges

Summary

  1. [clang-query][NFC] Silence a few lint warnings (details)
  2. [lldb] Fix "no matching std::pair constructor" on Ubuntu 16.04 (NFC) (details)
  3. [lld-macho] Implement weak binding for branch relocations (details)
  4. [lld-macho] Emit the right header flags for weak bindings/symbols (details)
  5. [lld-macho] Emit binding opcodes for defined symbols that override weak dysyms (details)
  6. [lld-macho] Implement GOT_LOAD relaxation (details)
  7. [lld-macho] Support GOT relocations to __dso_handle (details)
  8. [lld-macho] Weak locals should be relaxed too (details)
  9. [lld-macho][NFC] Define isHidden() in LinkEditSection (details)
  10. Revert "Use find_library for ncurses" (details)
  11. [MemorySSA] Assert defining access is not a MemoryUse. (details)
  12. [PowerPC] PPCBoolRetToInt: Don't translate Constant's operands (details)
Commit 3776999b494d05abc87a52bf8d5317fd3d68a8ab by n.james93
[clang-query][NFC] Silence a few lint warnings
The file was modifiedclang-tools-extra/clang-query/tool/ClangQuery.cpp
Commit 7f717b6d1f65f8474e8633b040a16c55f0ad6b96 by Jonas Devlieghere
[lldb] Fix "no matching std::pair constructor" on Ubuntu 16.04 (NFC)

Fixes error: no matching constructor for initialization of
'std::pair<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >'
with older toolchain (clang/libcxx) on Ubuntu 16.04. The issue is the
StringRef-to-std::string conversion.
The file was modifiedlldb/unittests/Symbol/PostfixExpressionTest.cpp
Commit e263287c797f7d143cf2f38e2df1d5fcee94f9b0 by jezng
[lld-macho] Implement weak binding for branch relocations

Since there is no "weak lazy" lookup, function calls to weak symbols are
always non-lazily bound. We emit both regular non-lazy bindings as well
as weak bindings, in order that the weak bindings may overwrite the
non-lazy bindings if an appropriate symbol is found at runtime. However,
the bound addresses will still be written (non-lazily) into the
LazyPointerSection.

Reviewed By: #lld-macho, smeenai

Differential Revision: https://reviews.llvm.org/D86573
The file was modifiedlld/MachO/Symbols.h
The file was modifiedlld/MachO/Arch/X86_64.cpp
The file was modifiedlld/MachO/Target.h
The file was modifiedlld/MachO/Writer.cpp
The file was modifiedlld/test/MachO/weak-definition-order.s
The file was modifiedlld/MachO/SyntheticSections.cpp
The file was modifiedlld/MachO/SyntheticSections.h
The file was modifiedlld/test/MachO/weak-binding.s
Commit 3da2130e45a4bd61df09bcdb15ec07e9fc71747c by jezng
[lld-macho] Emit the right header flags for weak bindings/symbols

Reviewed By: #lld-macho, smeenai

Differential Revision: https://reviews.llvm.org/D86574
The file was modifiedlld/MachO/SyntheticSections.h
The file was modifiedlld/MachO/SyntheticSections.cpp
The file was modifiedlld/MachO/Writer.cpp
The file was addedlld/test/MachO/weak-header-flags.s
Commit 2a38dba7dd4d3360908e93c326fbef6a7465346e by jezng
[lld-macho] Emit binding opcodes for defined symbols that override weak dysyms

These opcodes tell dyld to coalesce the overridden weak dysyms to this
particular symbol definition.

Reviewed By: #lld-macho, smeenai

Differential Revision: https://reviews.llvm.org/D86575
The file was modifiedlld/test/MachO/weak-header-flags.s
The file was modifiedlld/MachO/Symbols.h
The file was modifiedlld/MachO/SymbolTable.cpp
The file was modifiedlld/MachO/Writer.cpp
The file was addedlld/test/MachO/nonweak-definition-override.s
The file was modifiedlld/MachO/SyntheticSections.cpp
The file was modifiedlld/MachO/SyntheticSections.h
Commit 7083363c05abe4afd8af8d6bacdd79c9cf10585b by jezng
[lld-macho] Implement GOT_LOAD relaxation

We can have GOT_LOAD relocations that reference `__dso_handle`.
However, our binding opcode encoder doesn't support binding to the DSOHandle
symbol. Instead of adding support for that, I decided it would be cleaner to
implement GOT_LOAD relaxation since `__dso_handle`'s location is always
statically known.

Reviewed By: #lld-macho, smeenai

Differential Revision: https://reviews.llvm.org/D86641
The file was addedlld/test/MachO/x86-64-reloc-got-load.s
The file was modifiedlld/MachO/Arch/X86_64.cpp
The file was modifiedlld/test/MachO/local-got.s
Commit 0407197711f1004b79e3d7250f0612f67100e640 by jezng
[lld-macho] Support GOT relocations to __dso_handle

Found such a relocation while testing some real world programs.

Reviewed By: #lld-macho, smeenai

Differential Revision: https://reviews.llvm.org/D86642
The file was modifiedlld/test/MachO/dso-handle.s
The file was modifiedlld/MachO/Symbols.h
Commit ccbacdded4563baa5f016b1d084cde6c5876bf3e by jezng
[lld-macho] Weak locals should be relaxed too

Reviewed By: #lld-macho, smeenai

Differential Revision: https://reviews.llvm.org/D86746
The file was modifiedlld/MachO/SyntheticSections.h
The file was modifiedlld/MachO/Arch/X86_64.cpp
The file was modifiedlld/MachO/SyntheticSections.cpp
The file was modifiedlld/test/MachO/weak-binding.s
Commit ae8fa1d8a6cae1be0d069ded12e7980f398f877e by jezng
[lld-macho][NFC] Define isHidden() in LinkEditSection

Since it's always true

Reviewed By: #lld-macho, smeenai

Differential Revision: https://reviews.llvm.org/D86749
The file was modifiedlld/MachO/SyntheticSections.cpp
The file was modifiedlld/MachO/SyntheticSections.h
Commit cdcb9ab10e53ff08293915af3cd897c42112bcc5 by gkistanova
Revert "Use find_library for ncurses"

The introduction of find_library for ncurses caused more issues than it solved problems. The current open issue is it makes the static build of LLVM fail. It is better to revert for now, and get back to it later.

Revert "[CMake] Fix an issue where get_system_libname creates an empty regex capture on windows"
This reverts commit 1ed1e16ab83f55d85c90ae43a05cbe08a00c20e0.

Revert "Fix msan build"
This reverts commit 34fe9613dda3c7d8665b609136a8c12deb122382.

Revert "[CMake] Always mark terminfo as unavailable on Windows"
This reverts commit 76bf26236f6fd453343666c3cd91de8f74ffd89d.

Revert "[CMake] Fix OCaml build failure because of absolute path in system libs"
This reverts commit 8e4acb82f71ad4effec8895b8fc957189ce95933.

Revert "[CMake] Don't look for terminfo libs when LLVM_ENABLE_TERMINFO=OFF"
This reverts commit 495f91fd33d492941c39424a32cf24bcfe192f35.

Revert "Use find_library for ncurses"
This reverts commit a52173a3e56553d7b795bcf3cdadcf6433117107.

Differential revision: https://reviews.llvm.org/D86521
The file was modifiedlldb/source/Core/CMakeLists.txt
The file was modifiedllvm/lib/Support/Unix/Process.inc
The file was modifiedcompiler-rt/cmake/config-ix.cmake
The file was modifiedcompiler-rt/lib/xray/tests/CMakeLists.txt
The file was modifiedllvm/include/llvm/Config/config.h.cmake
The file was modifiedllvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
The file was modifiedllvm/lib/Support/CMakeLists.txt
The file was modifiedllvm/cmake/config-ix.cmake
Commit d370836c20c58c9092efbd1b2ee9002ab500af55 by asbirlea
[MemorySSA] Assert defining access is not a MemoryUse.
The file was modifiedllvm/lib/Analysis/MemorySSA.cpp
Commit cbea17568f4301582c1d5d43990f089ca6cff522 by lkail
[PowerPC] PPCBoolRetToInt: Don't translate Constant's operands

When collecting `i1` values via `findAllDefs`, ignore Constant's
operands, since Constant's operands might not be `i1`.

Fixes https://bugs.llvm.org/show_bug.cgi?id=46923 which causes ICE
```
llvm-project/llvm/lib/IR/Constants.cpp:1924: static llvm::Constant *llvm::ConstantExpr::getZExt(llvm::Constant *, llvm::Type *, bool): Assertion `C->getType()->getScalarSizeInBits() < Ty->getScalarSizeInBits()&& "SrcTy must be smaller than DestTy for ZExt!"' failed.
```

Differential Revision: https://reviews.llvm.org/D85007
The file was modifiedllvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp
The file was addedllvm/test/CodeGen/PowerPC/pr46923.ll