SuccessChanges

Summary

  1. [InstrProfiling] Delete linkage/visibility toggling for Windows (details)
  2. Recommit "Fix tmp files being left on Windows builds." with a fix for (details)
  3. Fix llvm/test/tools/llvm-dwp/X86/type_dedup_v5.test (details)
  4. [clangd] Improve resolution of static method calls in HeuristicResolver (details)
  5. [AArch64] Add regression test for missed bfi optimization. (details)
  6. Fix "control reaches end of non-void function" warnings on ppc64le (details)
  7. [clang] Fix fail of OpenMP/tile_codegen_tile_for.cpp. (details)
Commit 87c43f3aa99d778755c7f5420e955885f855ecad by i
[InstrProfiling] Delete linkage/visibility toggling for Windows

The linkage/visibility of `__profn_*` variables are derived
from the profiled functions.

    extern_weak => linkonce
    available_externally => linkonce_odr
    internal => private
    extern => private
    _ => unchanged

The linkage/visibility of `__profc_*`/`__profd_*` variables are derived from
`__profn_*` with linkage/visibility wrestling for Windows.

The changes can be folded to the following without changing semantics.

```
if (TT.isOSBinFormatCOFF() && !NeedComdat) {
  Linkage = GlobalValue::InternalLinkage;
  Visibility = GlobalValue::DefaultVisibility;
}
```

That said, I think we can just delete the code block.

An extern/internal function will now use private `__profc_*`/`__profd_*`
variables, instead of internal ones. This saves some symbol table entries.

A non-comdat {linkonce,weak}_odr function will now use hidden external
`__profc_*`/`__profd_*` variables instead of internal ones.  There is potential
object file size increase because such symbols need `/INCLUDE:` directives.
However such non-comdat functions are rare (note that non-comdat weak
definitions don't prevent duplicate definition error).

The behavior changes match ELF.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D103355
The file was modifiedllvm/test/Instrumentation/InstrProfiling/platform.ll
The file was modifiedllvm/test/Instrumentation/InstrProfiling/linkage.ll
The file was modifiedllvm/test/Instrumentation/InstrProfiling/profiling.ll
The file was modifiedcompiler-rt/test/profile/Windows/coverage-weak-lld.cpp
The file was modifiedllvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
Commit 9d070b2f4889887f9ce497592ef01df7b9601a1c by akhuang
Recommit "Fix tmp files being left on Windows builds." with a fix for
incorrect std::string use. (Also remove redundant call to
RemoveFileOnSignal.)

Clang writes object files by first writing to a .tmp file and then
renaming to the final .obj name. On Windows, if a compile is killed
partway through the .tmp files don't get deleted.

Currently it seems like RemoveFileOnSignal takes care of deleting the
tmp files on Linux, but on Windows we need to call
setDeleteDisposition on tmp files so that they are deleted when
closed.

This patch switches to using TempFile to create the .tmp files we write
when creating object files, since it uses setDeleteDisposition on Windows.
This change applies to both Linux and Windows for consistency.

Differential Revision: https://reviews.llvm.org/D102876

This reverts commit 20797b129f844d4b12ffb2b12cf33baa2d42985c.
The file was modifiedclang/lib/Frontend/CompilerInstance.cpp
The file was modifiedllvm/lib/Support/Path.cpp
The file was modifiedclang/include/clang/Frontend/CompilerInstance.h
The file was modifiedllvm/lib/Support/Windows/Path.inc
Commit 2541075c22aec261e45e2c4edba65b29ed472d2e by jyknight
Fix llvm/test/tools/llvm-dwp/X86/type_dedup_v5.test

It was writing files to the source dir after
316da543af14fb4b40ef0377fe770f430745f5ea.
The file was modifiedllvm/test/tools/llvm-dwp/X86/type_dedup_v5.test
Commit f976b9997ee55a130b139efe7b6e6f3b0384016b by zeratul976
[clangd] Improve resolution of static method calls in HeuristicResolver

Differential Revision: https://reviews.llvm.org/D101741
The file was modifiedclang-tools-extra/clangd/unittests/InlayHintTests.cpp
The file was modifiedclang-tools-extra/clangd/HeuristicResolver.cpp
Commit d8b9ed72ee838145a5c48d8b6fdccd00dc200c42 by efriedma
[AArch64] Add regression test for missed bfi optimization.

(See https://reviews.llvm.org/D60358 for the transform that breaks this
case.)
The file was modifiedllvm/test/CodeGen/AArch64/bitfield-insert.ll
Commit b2c8bcbab8a44c4582632845697b9425c3200230 by yitzhakm
Fix "control reaches end of non-void function" warnings on ppc64le

Warnings can be found here: https://lab.llvm.org/buildbot/#/builders/76/builds/2640

Reviewed By: ymandel

Differential Revision: https://reviews.llvm.org/D103565
The file was modifiedclang/lib/ASTMatchers/GtestMatchers.cpp
Commit 64e5a3bbdde25af0fd9f2b9b8539e23f36c80601 by llvm-project
[clang] Fix fail of OpenMP/tile_codegen_tile_for.cpp.

Clang's version string can be customized using CLANG_VENDOR which the
test did not consider. Change the test to accept any version string.
The file was modifiedclang/test/OpenMP/tile_codegen_tile_for.cpp