[all-commits] [llvm/llvm-project] 8ac709: [SemaTemplate] Stop passing insertion position aro...

Raul Tambre via All-commits all-commits at lists.llvm.org
Wed Nov 25 16:17:53 PST 2020


  Branch: refs/heads/release/11.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 8ac709578067f77a7036fe50610277516fa36d50
      https://github.com/llvm/llvm-project/commit/8ac709578067f77a7036fe50610277516fa36d50
  Author: Bruno Cardoso Lopes <bruno.cardoso at gmail.com>
  Date:   2020-11-24 (Tue, 24 Nov 2020)

  Changed paths:
    M clang/include/clang/Sema/Sema.h
    M clang/include/clang/Sema/Template.h
    M clang/lib/Sema/SemaTemplate.cpp
    M clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
    M clang/test/SemaTemplate/instantiate-var-template.cpp

  Log Message:
  -----------
  [SemaTemplate] Stop passing insertion position around during VarTemplate instantiation

They can get stale at use time because of updates from other recursive
specializations. Instead, rely on the existence of previous declarations to add
the specialization.

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

(cherry picked from commit cffb0dd54d41d8e249d2009467c4beb5b681ba26)


  Commit: 03565ffd5da8370f5b89b69cd9868f32e2d75403
      https://github.com/llvm/llvm-project/commit/03565ffd5da8370f5b89b69cd9868f32e2d75403
  Author: Raul Tambre <raul at tambre.ee>
  Date:   2020-11-25 (Wed, 25 Nov 2020)

  Changed paths:
    M clang/runtime/CMakeLists.txt
    M compiler-rt/cmake/Modules/AddCompilerRT.cmake
    M libunwind/src/CMakeLists.txt

  Log Message:
  -----------
  [CMake][compiler-rt][libunwind] Compile assembly files as ASM not C, unify workarounds

It isn't very wise to pass an assembly file to the compiler and tell it to compile as a C file and hope that the compiler recognizes it as assembly instead.
Simply don't mark the file as C and CMake will recognize the rest.

This was attempted earlier in https://reviews.llvm.org/D85706, but reverted due to architecture issues on Apple.
Subsequent digging revealed a similar change was done earlier for libunwind in https://reviews.llvm.org/rGb780df052dd2b246a760d00e00f7de9ebdab9d09.
Afterwards workarounds were added for MinGW and Apple:
* https://reviews.llvm.org/rGb780df052dd2b246a760d00e00f7de9ebdab9d09
* https://reviews.llvm.org/rGd4ded05ba851304b26a437896bc3962ef56f62cb

The workarounds in libunwind and compiler-rt are unified and comments added pointing to each other.
The workaround is updated to only be used for MinGW for CMake versions before 3.17, which fixed the issue (https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4287).

Additionally fixed Clang not being passed as the assembly compiler for compiler-rt runtime build.

Example error:
[525/634] Building C object lib/tsan/CMakeFiles/clang_rt.tsan-aarch64.dir/rtl/tsan_rtl_aarch64.S.o
FAILED: lib/tsan/CMakeFiles/clang_rt.tsan-aarch64.dir/rtl/tsan_rtl_aarch64.S.o
/opt/tooling/drive/host/bin/clang --target=aarch64-linux-gnu -I/opt/tooling/drive/llvm/compiler-rt/lib/tsan/.. -isystem /opt/tooling/drive/toolchain/opt/drive/toolchain/include -x c -Wall -Wno-unused-parameter -fno-lto -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -Wno-non-virtual-dtor -fPIE -fno-rtti -Wframe-larger-than=530 -Wglobal-constructors --sysroot=. -MD -MT lib/tsan/CMakeFiles/clang_rt.tsan-aarch64.dir/rtl/tsan_rtl_aarch64.S.o -MF lib/tsan/CMakeFiles/clang_rt.tsan-aarch64.dir/rtl/tsan_rtl_aarch64.S.o.d -o lib/tsan/CMakeFiles/clang_rt.tsan-aarch64.dir/rtl/tsan_rtl_aarch64.S.o -c /opt/tooling/drive/llvm/compiler-rt/lib/tsan/rtl/tsan_rtl_aarch64.S
/opt/tooling/drive/llvm/compiler-rt/lib/tsan/rtl/tsan_rtl_aarch64.S:29:1: error: expected identifier or '('
.section .text
^
1 error generated.

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

(cherry picked from commit 45344cf7ac5b848f77825ffa37b0cb3b69b9b07b)


Compare: https://github.com/llvm/llvm-project/compare/bbe6cbbed8c7...03565ffd5da8


More information about the All-commits mailing list