diff options
author | Chuanqi Xu <chuanqi.xcq@alibaba-inc.com> | 2024-11-04 17:50:44 +0800 |
---|---|---|
committer | Chuanqi Xu <yedeng.yd@linux.alibaba.com> | 2025-06-25 17:51:50 +0800 |
commit | 4efb61850b590941a8da51057d3a63782864f44c (patch) | |
tree | 0b2862afe0f0639c7384c38c2a9ca3ca36a4e6b7 /clang/lib/CodeGen/CGVTables.cpp | |
parent | 22ee837ec0ae5c097fa8e2cf49bfc504664f5ebe (diff) | |
download | llvm-4efb61850b590941a8da51057d3a63782864f44c.zip llvm-4efb61850b590941a8da51057d3a63782864f44c.tar.gz llvm-4efb61850b590941a8da51057d3a63782864f44c.tar.bz2 |
[C++20] [Modules] Handling template declare with debug info
It looks an overlook that debug info can't play well with
explicit template instantiation. Tested in donwstream for years. I just
forgot to upstream it.
Diffstat (limited to 'clang/lib/CodeGen/CGVTables.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGVTables.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGVTables.cpp b/clang/lib/CodeGen/CGVTables.cpp index 2897ccd..0b6e830 100644 --- a/clang/lib/CodeGen/CGVTables.cpp +++ b/clang/lib/CodeGen/CGVTables.cpp @@ -1138,7 +1138,9 @@ CodeGenModule::getVTableLinkage(const CXXRecordDecl *RD) { llvm::Function::InternalLinkage; case TSK_ExplicitInstantiationDeclaration: - llvm_unreachable("Should not have been asked to emit this"); + return IsExternalDefinition + ? llvm::GlobalVariable::AvailableExternallyLinkage + : llvm::GlobalVariable::ExternalLinkage; } } |