[sanitizer] Fix build error with current LoongArch Clang
authorYouling Tang <tangyouling@loongson.cn>
Tue, 1 Nov 2022 12:48:45 +0000 (20:48 +0800)
committerWeining Lu <luweining@loongson.cn>
Tue, 1 Nov 2022 12:48:53 +0000 (20:48 +0800)
commitcb84df210a477c1038b659c9de5d1a01fdb85b92
treeb767ae0831b54149c07dbffd96a9acfaff70a595
parent867ff7c994b4b891c8d92f0dff6bac70f9d9dcf4
[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
compiler-rt/lib/sanitizer_common/sanitizer_syscall_linux_loongarch64.inc