65 lines · cpp
1//// Explicitly enabled:2// RUN: %clang_cc1 -triple x86_64-none-linux-gnu -debug-info-kind=standalone \3// RUN: -emit-llvm -fexperimental-assignment-tracking=enabled %s -o - -O1 \4// RUN: | FileCheck %s --check-prefixes=ENABLE5 6//// Explicitly disabled:7// RUN: %clang_cc1 -triple x86_64-none-linux-gnu -debug-info-kind=standalone \8// RUN: -emit-llvm %s -o - -fexperimental-assignment-tracking=disabled -O1\9// RUN: | FileCheck %s --check-prefixes=DISABLE10 11//// Enabled by default:12// RUN: %clang_cc1 -triple x86_64-none-linux-gnu -debug-info-kind=standalone \13// RUN: -emit-llvm %s -o - -O1 \14// RUN: | FileCheck %s --check-prefixes=ENABLE15 16//// Disabled at O0 unless forced.17// RUN: %clang_cc1 -triple x86_64-none-linux-gnu -debug-info-kind=standalone \18// RUN: -emit-llvm %s -o - -fexperimental-assignment-tracking=enabled \19// RUN: -O0 -disable-O0-optnone \20// RUN: | FileCheck %s --check-prefixes=DISABLE21// RUN: %clang_cc1 -triple x86_64-none-linux-gnu -debug-info-kind=standalone \22// RUN: -emit-llvm %s -o - -fexperimental-assignment-tracking=forced \23// RUN: -O0 -disable-O0-optnone \24// RUN: | FileCheck %s --check-prefixes=ENABLE25 26//// Disabled for LTO and thinLTO unless forced.27// RUN: %clang_cc1 -triple x86_64-none-linux-gnu -debug-info-kind=standalone \28// RUN: -emit-llvm %s -o - -fexperimental-assignment-tracking=enabled \29// RUN: -O1 -flto=full \30// RUN: | FileCheck %s --check-prefixes=DISABLE31// RUN: %clang_cc1 -triple x86_64-none-linux-gnu -debug-info-kind=standalone \32// RUN: -emit-llvm %s -o - -fexperimental-assignment-tracking=enabled \33// RUN: -O1 -flto=thin \34// RUN: | FileCheck %s --check-prefixes=DISABLE35// RUN: %clang_cc1 -triple x86_64-none-linux-gnu -debug-info-kind=standalone \36// RUN: -emit-llvm %s -o - -fexperimental-assignment-tracking=forced \37// RUN: -O1 -flto=full \38// RUN: | FileCheck %s --check-prefixes=ENABLE39// RUN: %clang_cc1 -triple x86_64-none-linux-gnu -debug-info-kind=standalone \40// RUN: -emit-llvm %s -o - -fexperimental-assignment-tracking=forced \41// RUN: -O1 -flto=thin \42// RUN: | FileCheck %s --check-prefixes=ENABLE43 44//// Disabled for LLDB debugger tuning unless forced.45// RUN: %clang_cc1 -triple x86_64-none-linux-gnu -debug-info-kind=standalone \46// RUN: -emit-llvm %s -o - -fexperimental-assignment-tracking=enabled \47// RUN: -O1 -debugger-tuning=lldb \48// RUN: | FileCheck %s --check-prefixes=DISABLE49// RUN: %clang_cc1 -triple x86_64-none-linux-gnu -debug-info-kind=standalone \50// RUN: -emit-llvm %s -o - -fexperimental-assignment-tracking=forced \51// RUN: -O1 -debugger-tuning=lldb \52// RUN: | FileCheck %s --check-prefixes=ENABLE53 54// Check the assignment-tracking module flag appears in the output when the55// flag -fexperimental-assignment-tracking is set to 'enabled' (in some cases)56// or 'forced' (always), and is does not appear when the flag is set to57// 'disabled' (default).58 59// ENABLE: "debug-info-assignment-tracking"60// DISABLE-NOT: "debug-info-assignment-tracking"61//// Check there's actually any output at all.62// DISABLE: llvm.module.flags63 64void fun(int a) {}65