[all-commits] [llvm/llvm-project] cb2343: [XCOFF] Do not generate the special .ref for zero-...

DianQK via All-commits all-commits at lists.llvm.org
Thu Sep 28 23:26:38 PDT 2023


  Branch: refs/heads/release/17.x
  Home:   https://github.com/llvm/llvm-project
  Commit: cb23434f9e6354407ad75436356536d72179fa75
      https://github.com/llvm/llvm-project/commit/cb23434f9e6354407ad75436356536d72179fa75
  Author: Wael Yehia <44115484+w2yehia at users.noreply.github.com>
  Date:   2023-09-29 (Fri, 29 Sep 2023)

  Changed paths:
    M llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
    M llvm/test/CodeGen/PowerPC/pgo-ref-directive.ll

  Log Message:
  -----------
  [XCOFF] Do not generate the special .ref for zero-length sections (#66805)

Co-authored-by: Wael Yehia <wyehia at ca.ibm.com>
(cherry picked from commit da55b1b52fbce80093eee8dd4185df4861a44ba5)


  Commit: c056d720b534a068bdebbb3eae441b6702472e9b
      https://github.com/llvm/llvm-project/commit/c056d720b534a068bdebbb3eae441b6702472e9b
  Author: Alex Langford <alangford at apple.com>
  Date:   2023-09-29 (Fri, 29 Sep 2023)

  Changed paths:
    M lldb/cmake/modules/LLDBConfig.cmake
    M lldb/cmake/modules/LLDBStandalone.cmake

  Log Message:
  -----------
  [lldb][NFCI] Change logic to find clang resource dir in standalone builds

As of 0beffb854209a41f31beb18f9631258349a99299 there is a CMake
function to actually calculate the relative path to the clang resource
directory. Currently we have some bespoke logic that looks in a few
places, but with this new function we should be able to eliminate some
complexity here.

Also, I moved the functionality from LLDBConfig to LLDBStandalone since
it is only used in standalone builds.

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

(cherry picked from commit a809720102fae8d1b5a7073f99f9dae9395c5f41)


  Commit: 9da5b7a93bca381352856ec4562e2b96b0ebdb80
      https://github.com/llvm/llvm-project/commit/9da5b7a93bca381352856ec4562e2b96b0ebdb80
  Author: Alex Langford <alangford at apple.com>
  Date:   2023-09-29 (Fri, 29 Sep 2023)

  Changed paths:
    M lldb/source/API/CMakeLists.txt

  Log Message:
  -----------
  [lldb] Fix building LLDB standlone without framework

In a809720102fae8d1b5a7073f99f9dae9395c5f41 I refactored some logic to
deal with the clang resource directory in standalone LLDB builds.
However, this logic escaped me because it only runs when you do not
build LLDB.framework.

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

(cherry picked from commit 6888de118707e6392b46073fc35738804f9f1d80)


  Commit: 87ec1f460d0efbc565e89f817af73c2496361749
      https://github.com/llvm/llvm-project/commit/87ec1f460d0efbc565e89f817af73c2496361749
  Author: Artem Belevich <tra at google.com>
  Date:   2023-09-29 (Fri, 29 Sep 2023)

  Changed paths:
    M clang/lib/Headers/CMakeLists.txt
    A clang/lib/Headers/cuda_wrappers/bits/basic_string.h
    A clang/lib/Headers/cuda_wrappers/bits/basic_string.tcc

  Log Message:
  -----------
  Work around two more instances of __noinline__ conflicts. (#66138)

Fixes https://github.com/llvm/llvm-project/issues/57544

(cherry picked from commit 588023ddafb4b0cd11914ab068c6d07187374d69)


  Commit: 45066b9fbc7b84dfcf5363d01fadd3d42c049e7f
      https://github.com/llvm/llvm-project/commit/45066b9fbc7b84dfcf5363d01fadd3d42c049e7f
  Author: Shoaib Meenai <smeenai at fb.com>
  Date:   2023-09-29 (Fri, 29 Sep 2023)

  Changed paths:
    M clang/lib/Sema/SemaChecking.cpp
    M clang/test/FixIt/format.cpp

  Log Message:
  -----------
  [Sema] Fix fixit cast printing inside macros (#66853)

`Lexer::getLocForEndOfToken` is documented as returning an invalid
source location when the end of the token is inside a macro expansion.
We don't want that for this particular application, so just calculate
the end location directly instead.

Before this, format fix-its would omit the closing parenthesis (thus
producing invalid code) for macros, e.g.:

```
$ cat format.cpp
extern "C" int printf(const char *, ...);
enum class Foo { Bar };
#define LOG(...) printf(__VA_ARGS__)
void f(Foo foo) { LOG("%d\n", foo); }

$ clang -fsyntax-only format.cpp
format.cpp:4:29: warning: format specifies type 'int' but the argument has type 'Foo' [-Wformat]
    4 | void f(Foo f) { LOG("%d\n", f); }
      |                      ~~     ^
      |                             static_cast<int>(
format.cpp:3:25: note: expanded from macro 'LOG'
    3 | #define LOG(...) printf(__VA_ARGS__)
      |                         ^~~~~~~~~~~
1 warning generated.
```

We now emit a valid fix-it:

```
$ clang -fsyntax-only format.cpp
format.cpp:4:31: warning: format specifies type 'int' but the argument has type 'Foo' [-Wformat]
    4 | void f(Foo foo) { LOG("%d\n", foo); }
      |                        ~~     ^~~
      |                               static_cast<int>( )
format.cpp:3:25: note: expanded from macro 'LOG'
    3 | #define LOG(...) printf(__VA_ARGS__)
      |                         ^~~~~~~~~~~
1 warning generated.
```

Fixes https://github.com/llvm/llvm-project/issues/63462

(cherry picked from commit 61c5ad8857a71510e4393680a1e42740da4ba6fa)


  Commit: e718f3240a57454ae14022cf3ccaba5245786a53
      https://github.com/llvm/llvm-project/commit/e718f3240a57454ae14022cf3ccaba5245786a53
  Author: Argyrios Kyrtzidis <kyrtzidis at apple.com>
  Date:   2023-09-29 (Fri, 29 Sep 2023)

  Changed paths:
    M clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h
    M clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp
    A clang/test/ClangScanDeps/relative-filenames.c

  Log Message:
  -----------
  [DependencyScanningFilesystem] Make sure the local/shared cache filename lookups use only absolute paths (#66122)

Previously a relative path would be used as a key for cache lookup and
if the same relative path was used from another compiler invocation with
a different working directory then the first cache entry was erroneously
returned.

(cherry picked from commit 36b37c775c285bbff9b57630e7ea9d00b918cc91)


  Commit: 78d201ebc3e2ee3c20db961e68bdaf7924b5c2fe
      https://github.com/llvm/llvm-project/commit/78d201ebc3e2ee3c20db961e68bdaf7924b5c2fe
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2023-09-29 (Fri, 29 Sep 2023)

  Changed paths:
    M llvm/test/Transforms/MemCpyOpt/memcpy.ll

  Log Message:
  -----------
  [MemCpyOpt] Add test for #67539 (NFC)

(cherry picked from commit d5c8b23b1ee1dcb6922e8226143410840edabe50)


  Commit: 098e653a5bed2e5fb2af6ccaedf2268d7d3935fa
      https://github.com/llvm/llvm-project/commit/098e653a5bed2e5fb2af6ccaedf2268d7d3935fa
  Author: DianQK <dianqk at dianqk.net>
  Date:   2023-09-29 (Fri, 29 Sep 2023)

  Changed paths:
    M llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
    M llvm/test/Transforms/MemCpyOpt/memcpy.ll

  Log Message:
  -----------
  [MemCpyOpt] Merge alias metadatas when replacing arguments (#67539)

Alias metadata may no longer be valid after replacing the call argument.
Fix this by merging it with the memcpy alias metadata.

This fixes a miscompilation encountered in
https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Failing.20tests.20when.20rustc.20is.20compiled.20with.201.20CGU.

(cherry picked from commit 4e6e476329a8359cb381517864ed6f88a152e37b)


Compare: https://github.com/llvm/llvm-project/compare/1b55dc9d94c3...098e653a5bed


More information about the All-commits mailing list