MSVC always emits minimal CodeView metadata with compiler information, even when debug info is otherwise disabled. Other tools may rely on this metadata being present. For example, linkers use it to determine whether hotpatching is enabled for the object file.
10 lines
280 B
C
10 lines
280 B
C
// REQUIRES: !system-windows
|
|
// RUN: %clang -g -S -emit-llvm -o - %s | FileCheck %s
|
|
// RUN: %clang -S -emit-llvm -o - %s | FileCheck %s --check-prefix=NO_DEBUG
|
|
int main (void) {
|
|
return 0;
|
|
}
|
|
|
|
// CHECK: i32 2, !"Debug Info Version", i32 3}
|
|
// NO_DEBUG-NOT: !"Debug Info Version"
|