[PATCH] D130255: [Clang][LoongArch] Add initial LoongArch target and driver support
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 21 19:35:45 PDT 2022
MaskRay added inline comments.
================
Comment at: clang/lib/Driver/ToolChains/Linux.cpp:480
+ LibDir = std::string(getOSLibDir(Triple, Args));
+ StringRef ABIName = tools::loongarch::getLoongArchABI(Args, Triple);
+ Loader = ("ld-linux-loongarch-" + ABIName + ".so.1").str();
----------------
avoid simple variable which is only used once
================
Comment at: clang/test/Driver/loongarch64-toolchain.c:4
+
+// RUN: %clang %s -### -no-canonical-prefixes -target loongarch64 2>&1 | FileCheck -check-prefix=CC1 %s
+// CC1: clang{{.*}} "-cc1" "-triple" "loongarch64"
----------------
Just remove `-no-canonical-prefixes` and `clang{{.*}}` below. `"-cc1"` is sufficient to anchor a cc1 line.
================
Comment at: clang/test/Preprocessor/init-loongarch.c:21
+// LA32: #define __ATOMIC_ACQUIRE 2
+// LA32: #define __ATOMIC_ACQ_REL 4
+// LA32: #define __ATOMIC_CONSUME 1
----------------
Consider using `-NEXT` for related values
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130255/new/
https://reviews.llvm.org/D130255
More information about the cfe-commits
mailing list