[clang] 69ed733 - [RISCV] Add testcase for -mcmodel= (#107816)

via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 10 18:17:08 PDT 2024


Author: Jim Lin
Date: 2024-09-11T09:17:05+08:00
New Revision: 69ed73380b9a1ec2d09d9b443a52b3ccd141334d

URL: https://github.com/llvm/llvm-project/commit/69ed73380b9a1ec2d09d9b443a52b3ccd141334d
DIFF: https://github.com/llvm/llvm-project/commit/69ed73380b9a1ec2d09d9b443a52b3ccd141334d.diff

LOG: [RISCV] Add testcase for -mcmodel= (#107816)

This is a pre-commit test for #107817

Added: 
    clang/test/Driver/riscv-mcmodel.c

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/clang/test/Driver/riscv-mcmodel.c b/clang/test/Driver/riscv-mcmodel.c
new file mode 100644
index 00000000000000..4f5fa95f59b666
--- /dev/null
+++ b/clang/test/Driver/riscv-mcmodel.c
@@ -0,0 +1,14 @@
+// RUN: %clang --target=riscv32 -### -c -mcmodel=small %s 2>&1 | FileCheck --check-prefix=SMALL %s
+// RUN: %clang --target=riscv64 -### -c -mcmodel=small %s 2>&1 | FileCheck --check-prefix=SMALL %s
+
+// RUN: %clang --target=riscv32 -### -c -mcmodel=medlow %s 2>&1 | FileCheck --check-prefix=SMALL %s
+// RUN: %clang --target=riscv64 -### -c -mcmodel=medlow %s 2>&1 | FileCheck --check-prefix=SMALL %s
+
+// RUN: %clang --target=riscv32 -### -c -mcmodel=medium %s 2>&1 | FileCheck --check-prefix=MEDIUM %s
+// RUN: %clang --target=riscv64 -### -c -mcmodel=medium %s 2>&1 | FileCheck --check-prefix=MEDIUM %s
+
+// RUN: %clang --target=riscv32 -### -c -mcmodel=medany %s 2>&1 | FileCheck --check-prefix=MEDIUM %s
+// RUN: %clang --target=riscv64 -### -c -mcmodel=medany %s 2>&1 | FileCheck --check-prefix=MEDIUM %s
+
+// SMALL: "-mcmodel=small"
+// MEDIUM: "-mcmodel=medium"


        


More information about the cfe-commits mailing list