[NFC] Fix C++20 module test in PPC and warning
authorChuanqi Xu <yedeng.yd@linux.alibaba.com>
Wed, 8 Dec 2021 06:25:42 +0000 (14:25 +0800)
committerChuanqi Xu <yedeng.yd@linux.alibaba.com>
Wed, 8 Dec 2021 06:25:51 +0000 (14:25 +0800)
clang/lib/Sema/SemaModule.cpp
clang/test/CodeGenCXX/module-extern-C.cpp

index 34a6c6e..f497199 100644 (file)
@@ -712,7 +712,8 @@ Module *Sema::PushGlobalModuleFragment(SourceLocation BeginLoc,
   // Enter the scope of the global module.
   ModuleScopes.push_back({BeginLoc, GlobalModule,
                           /*ModuleInterface=*/false,
-                          /*ImplicitGlobalModuleFragment=*/IsImplicit});
+                          /*ImplicitGlobalModuleFragment=*/IsImplicit,
+                          /*VisibleModuleSet*/{}});
   VisibleModules.setVisible(GlobalModule, BeginLoc);
 
   return GlobalModule;
index 0b4bbc2..d8012ad 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++20 -emit-llvm -triple %itanium_abi_triple -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -emit-llvm -triple %itanium_abi_triple -o - %s | FileCheck %s
 
 module;
 
@@ -6,21 +6,21 @@ module;
 
 export module x;
 
-// CHECK: define dso_local void @foo()
+// CHECK: void @foo()
 extern "C" void foo() {
   return;
 }
 
 extern "C" {
-// CHECK: define dso_local void @bar()
+// CHECK: void @bar()
 void bar() {
   return;
 }
-// CHECK: define dso_local i32 @baz()
+// CHECK: i32 @baz()
 int baz() {
   return 3;
 }
-// CHECK: define dso_local double @double_func()
+// CHECK: double @double_func()
 double double_func() {
   return 5.0;
 }