Since the serialization code would recognize modules by names and the name of all global module fragment is <global>, so that the serialization code would complain for the same module. This patch fixes this by using a unique global module fragment in Sema. Before this patch, the compiler would fail on an assertion complaining the duplicated modules. Reviewed By: urnathan, rsmith Differential Revision: https://reviews.llvm.org/D115610
8 lines
281 B
C++
8 lines
281 B
C++
// RUN: rm -fr %t
|
|
// RUN: mkdir %t
|
|
// RUN: %clang_cc1 -std=c++20 -emit-module-interface %S/Inputs/m8.cppm -I%S/Inputs -o %t/m8.pcm
|
|
// RUN: %clang_cc1 -std=c++20 -I%S/Inputs/ -fprebuilt-module-path=%t %s -verify -fsyntax-only
|
|
// expected-no-diagnostics
|
|
export module t8;
|
|
import m8;
|