llvm-project/clang/test/CodeGenCXX/global-llvm-constant.cpp
Alexis Hunt aecc45cb3c Mangle static variables with an extra name to distinguish them from non-static variables in the same TU.
Fixes PR5966 for real this time; also reverts r92911, which had a incorrect fix.

llvm-svn: 94352
2010-01-24 03:04:27 +00:00

11 lines
143 B
C++

// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
struct A {
A() { x = 10; }
int x;
};
const A x;
// CHECK: @_ZL1x = internal global