-
Notifications
You must be signed in to change notification settings - Fork 752
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Serialization] Try to clean up PendingUndeducedFunctionDecls when
PendingUndeducedFunctionDecls is not empty Close llvm/llvm-project#120277 This turns out to be a simple oversight initially. See the analysis in llvm/llvm-project@ba1e84f for the wider background.
- Loading branch information
1 parent
21996bd
commit 4b35dd5
Showing
2 changed files
with
60 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// RUN: rm -rf %t | ||
// RUN: mkdir -p %t | ||
// RUN: split-file %s %t | ||
// | ||
// RUN: %clang_cc1 -std=c++20 %t/a.cppm -emit-module-interface -o %t/a.pcm | ||
// RUN: %clang_cc1 -std=c++20 %t/b.cppm -emit-module-interface -o %t/b.pcm \ | ||
// RUN: -fprebuilt-module-path=%t | ||
// RUN: %clang_cc1 -std=c++20 %t/c.cppm -emit-module-interface -o %t/c.pcm \ | ||
// RUN: -fprebuilt-module-path=%t | ||
// RUN: %clang_cc1 -std=c++20 %t/d.cppm -emit-module-interface -o %t/d.pcm \ | ||
// RUN: -fprebuilt-module-path=%t | ||
// RUN: %clang_cc1 -std=c++20 %t/d.pcm -emit-llvm -o %t/d.ll \ | ||
// RUN: -fprebuilt-module-path=%t | ||
// RUN: cat %t/d.ll | FileCheck %t/d.cppm | ||
|
||
//--- a.cppm | ||
export module a; | ||
|
||
export template<int> | ||
struct a { | ||
static auto f() { | ||
} | ||
}; | ||
|
||
//--- b.cppm | ||
export module b; | ||
|
||
import a; | ||
|
||
void b() { | ||
a<0> t; | ||
} | ||
|
||
//--- c.cppm | ||
export module c; | ||
|
||
import a; | ||
|
||
void c() { | ||
a<0>::f(); | ||
} | ||
|
||
//--- d.cppm | ||
export module d; | ||
|
||
import a; | ||
import b; | ||
import c; | ||
|
||
struct d { | ||
static void g() { | ||
a<0>::f(); | ||
a<1>::f(); | ||
} | ||
}; | ||
|
||
// fine enough to check it won't crash | ||
// CHECK: define |