[all-commits] [llvm/llvm-project] cb84df: [sanitizer] Fix build error with current LoongArch...

Lu Weining via All-commits all-commits at lists.llvm.org
Tue Nov 1 05:49:31 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cb84df210a477c1038b659c9de5d1a01fdb85b92
      https://github.com/llvm/llvm-project/commit/cb84df210a477c1038b659c9de5d1a01fdb85b92
  Author: Youling Tang <tangyouling at loongson.cn>
  Date:   2022-11-01 (Tue, 01 Nov 2022)

  Changed paths:
    M compiler-rt/lib/sanitizer_common/sanitizer_syscall_linux_loongarch64.inc

  Log Message:
  -----------
  [sanitizer] Fix build error with current LoongArch Clang

Fix the following build failures:
```
In file included from /home/loongson/llvm-work/llvm-project/compiler-rt/lib/sanitizer_common/sanit>
llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_syscall_linux_loongarch64.inc:27:23: error>
  register u64 a7 asm("a7") = nr;
                      ^
llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_syscall_linux_loongarch64.inc:28:23: error>
  register u64 a0 asm("a0");                      ^
```

The non-prefix `$` syntax in inline assembly is not supported in clang
yet (it is supported by gcc), add prefix `$` to solve the problem.

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




More information about the All-commits mailing list