llvm-project/clang/test/Driver/extend-variable-liveness.c
Stephen Tozer 36af7345df Reapply "[Clang] Enable -fextend-variable-liveness at -Og (#118026)"
Relands this feature after several fixes:

* Force fake uses to be emitted before musttail calls (#136867)
* Added soften-float legalization for fake uses (#142714)
* Treat fake uses as size-less instructions in a SystemZ assert (#144390)

If further issues with fake uses are found then this may be reverted again,
but all currently-known issues are resolved.

This reverts commit 2dc6e98169baeb1f73036da0ea50fd828d8323d0.
2025-06-19 16:22:50 +01:00

16 lines
914 B
C

// Tests that -fextend-variable-liveness and its aliases are correctly passed
// by the driver, and are set by default at -Og.
// RUN: %clang -### -c %s 2>&1 | FileCheck %s --check-prefixes=CHECK,DEFAULT
// RUN: %clang -### -Og -c %s 2>&1 | FileCheck %s --check-prefixes=CHECK,ALL
// RUN: %clang -fextend-variable-liveness=none -### -c %s 2>&1 | FileCheck %s --check-prefixes=CHECK,NONE
// RUN: %clang -fextend-variable-liveness=this -### -c %s 2>&1 | FileCheck %s --check-prefixes=CHECK,THIS
// RUN: %clang -fextend-variable-liveness=all -### -c %s 2>&1 | FileCheck %s --check-prefixes=CHECK,ALL
// RUN: %clang -fextend-variable-liveness -### -c %s 2>&1 | FileCheck %s --check-prefixes=CHECK,ALL
// CHECK: "-cc1"
// DEFAULT-NOT: -fextend-variable-liveness
// NONE-SAME: "-fextend-variable-liveness=none"
// THIS-SAME: "-fextend-variable-liveness=this"
// ALL-SAME: "-fextend-variable-liveness=all"