Skip to content

Commit

Permalink
[RISCV] Add testcase for -mcmodel= (#107816)
Browse files Browse the repository at this point in the history
This is a pre-commit test for #107817
  • Loading branch information
tclin914 authored Sep 11, 2024
1 parent 77fc8da commit 69ed733
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions clang/test/Driver/riscv-mcmodel.c
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 69ed733

Please sign in to comment.