diff options
Diffstat (limited to 'test/CodeGenCXX/anonymous-namespaces.cpp')
-rw-r--r-- | test/CodeGenCXX/anonymous-namespaces.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/CodeGenCXX/anonymous-namespaces.cpp b/test/CodeGenCXX/anonymous-namespaces.cpp index abc700fef6c29..b2857ff41714d 100644 --- a/test/CodeGenCXX/anonymous-namespaces.cpp +++ b/test/CodeGenCXX/anonymous-namespaces.cpp @@ -6,7 +6,8 @@ int f(); namespace { // CHECK-1: @_ZN12_GLOBAL__N_11bE = internal global i32 0 - // CHECK-1: @_ZN12_GLOBAL__N_1L1cE = internal global i32 0 + // CHECK-1: @_ZN12_GLOBAL__N_11cE = internal global i32 0 + // CHECK-1: @_ZN12_GLOBAL__N_12c2E = internal global i32 0 // CHECK-1: @_ZN12_GLOBAL__N_11D1dE = internal global i32 0 // CHECK-1: @_ZN12_GLOBAL__N_11aE = internal global i32 0 int a = 0; @@ -15,6 +16,12 @@ namespace { static int c = f(); + // Note, we can't use an 'L' mangling for c or c2 (like GCC does) based on + // the 'static' specifier, because the variable can be redeclared without it. + extern int c2; + int g() { return c2; } + static int c2 = f(); + class D { static int d; }; |