Skip to content

Commit 8ef3494

Browse files
committed
Rename global-var -> extern-var
1 parent c590d72 commit 8ef3494

File tree

6 files changed

+17
-14
lines changed

6 files changed

+17
-14
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module ExternVar {
2+
header "extern-var.h"
3+
}

test/Interop/Cxx/extern-var/global-var-irgen.swift renamed to test/Interop/Cxx/extern-var/extern-var-irgen.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// Test that global variables are handled properly by the ClangImporter.
22

33
// RUN: %empty-directory(%t)
4-
// RUN: %target-build-swift %s -I %S/Inputs -emit-ir -o %t/global-var.ir -Xfrontend -enable-cxx-interop
5-
// RUN: %FileCheck < %t/global-var.ir %s
4+
// RUN: %target-build-swift %s -I %S/Inputs -emit-ir -o %t/extern-var.ir -Xfrontend -enable-cxx-interop
5+
// RUN: %FileCheck < %t/extern-var.ir %s
66

77
// CHECK: @counter = external global i32, align 4
88
// CHECK: @_ZN10Namespaced7counterE = external global i32, align 4
99

10-
import GlobalVar
10+
import ExternVar
1111

1212
func getCounter() -> CInt {
1313
return counter

test/Interop/Cxx/extern-var/global-var-silgen.swift renamed to test/Interop/Cxx/extern-var/extern-var-silgen.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// Test that global variables are handled properly by the ClangImporter.
22

33
// RUN: %empty-directory(%t)
4-
// RUN: %target-build-swift %s -I %S/Inputs -emit-sil -o %t/global-var.sil -Xfrontend -enable-cxx-interop
5-
// RUN: %FileCheck < %t/global-var.sil %s
4+
// RUN: %target-build-swift %s -I %S/Inputs -emit-sil -o %t/extern-var.sil -Xfrontend -enable-cxx-interop
5+
// RUN: %FileCheck < %t/extern-var.sil %s
66

77
// CHECK: %0 = global_addr @counter : $*Int32
88
// CHECK: %0 = global_addr @_ZN10Namespaced7counterE : $*Int32
99

10-
import GlobalVar
10+
import ExternVar
1111

1212
func getCounter() -> CInt {
1313
return counter

test/Interop/Cxx/extern-var/global-var.swift renamed to test/Interop/Cxx/extern-var/extern-var.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
// Test that global variables are handled properly by the ClangImporter.
22

33
// RUN: %empty-directory(%t)
4-
// RUN: %target-clang -c %S/Inputs/global-var.cc -I %S/Inputs -fPIC -o %t/global-var.o
5-
// RUN: %target-build-swift %s -I %S/Inputs -o %t/global-var %t/global-var.o -Xfrontend -enable-cxx-interop
6-
// RUN: %target-codesign %t/global-var
7-
// RUN: %target-run %t/global-var
4+
// RUN: %target-clang -c %S/Inputs/extern-var.cc -I %S/Inputs -fPIC -o %t/extern-var.o
5+
// RUN: %target-build-swift %s -I %S/Inputs -o %t/extern-var %t/extern-var.o -Xfrontend -enable-cxx-interop
6+
// RUN: %target-codesign %t/extern-var
7+
// RUN: %target-run %t/extern-var
88
//
99
// REQUIRES: executable_test
1010

11-
import GlobalVar
11+
import ExternVar
1212
import StdlibUnittest
1313

14-
var StaticsTestSuite = TestSuite("global-var")
14+
var StaticsTestSuite = TestSuite("extern-var")
1515

16-
StaticsTestSuite.test("global-var") {
16+
StaticsTestSuite.test("extern-var") {
1717
expectEqual(counter, 0)
1818
expectEqual(count(), 1)
1919
expectEqual(counter, 1)
@@ -22,7 +22,7 @@ StaticsTestSuite.test("global-var") {
2222
expectEqual(count(), 43)
2323
}
2424

25-
StaticsTestSuite.test("namespaced-global-var") {
25+
StaticsTestSuite.test("namespaced-extern-var") {
2626
expectEqual(Namespaced.counter, 0)
2727
expectEqual(Namespaced.count(), 1)
2828
expectEqual(Namespaced.counter, 1)

0 commit comments

Comments
 (0)