mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 10:26:06 +00:00

This patch adds a new option -fkeep-persistent-storage-variables to emit all variables that have a persistent storage duration, including global, static and thread-local variables. This could be useful in cases where the presence of all these variables as symbols in the object file are required, so that they can be directly addressed. Reviewed By: hubert.reinterpretcast Differential Revision: https://reviews.llvm.org/D150221
6 lines
338 B
C
6 lines
338 B
C
// RUN: %clang -fkeep-persistent-storage-variables -c %s -### 2>&1 | FileCheck %s
|
|
// RUN: %clang -fkeep-persistent-storage-variables -fno-keep-persistent-storage-variables -c %s -### 2>&1 | FileCheck %s -check-prefix=CHECK-NOKEEP
|
|
|
|
// CHECK: "-fkeep-persistent-storage-variables"
|
|
// CHECK-NOKEEP-NOT: "-fkeep-persistent-storage-variables"
|