https://bugs.llvm.org/show_bug.cgi?id=45075
Bug ID: 45075
Summary: Compile error due to mismatch in cached linkage
(related to c++20 modules)
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++2a
Assignee: unassignedclangb...@nondot.org
Reporter: aanton...@gmail.com
CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk
Created attachment 23193
--> https://bugs.llvm.org/attachment.cgi?id=23193&action=edit
Library interface and and main call site.
The bug is related to compilation of template functions in public and private
parts of a C++20 module.
The following assertion fails:
clang++: /home/anton/llvm-project/clang/lib/AST/Decl.cpp:1472:
clang::LinkageInfo clang::LinkageComputer::getLVForDecl(const
clang::NamedDecl*, clang::LVComputationKind): Assertion `D->getCachedLinkage()
== LV.getLinkage()' failed.
After the following compilation steps:
clang++ -std=c++2a -fmodules --precompile lib.cppm;
clang++ -std=c++2a -fmodules main.cpp -fmodule-file=lib.pcm -o m;
Files are attached.
The bug can be skipped if the definition of call() function in detail namespace
is also exported, however it should not be to keep public and private library
parts well separated.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs