aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-objdump/llvm-objdump.cpp
diff options
context:
space:
mode:
authorChuanqi Xu <yedeng.yd@linux.alibaba.com>2022-02-23 16:23:26 +0800
committerChuanqi Xu <yedeng.yd@linux.alibaba.com>2022-03-24 10:24:14 +0800
commit84746686088799ec9e3cc5ea0a64df81423da290 (patch)
treea56f82c2bbfb1cf41fd3cdfbe16585856de0b93e /llvm/tools/llvm-objdump/llvm-objdump.cpp
parentd7afea9eb84274a4c5046253f4d78a8fdd262803 (diff)
downloadllvm-84746686088799ec9e3cc5ea0a64df81423da290.zip
llvm-84746686088799ec9e3cc5ea0a64df81423da290.tar.gz
llvm-84746686088799ec9e3cc5ea0a64df81423da290.tar.bz2
[C++20] [Modules] Make the linkage consistent for template and its
specialization Before the patch, the compiler would crash for the test due to inconsistent linkage. This patch tries to avoid it by make the linkage consistent for template and its specialization. After the patch, the behavior of compiler would be partially correct for the case. The correct one is: ``` export template<class T> void f() {} template<> void f<int>() {} ``` In this case, the linkage for both declaration should be external (the wording I get by consulting in WG21 is "the linkage for name f should be external"). And for the case: ``` template<class T> void f() {} export template<> void f<int>() {} ``` Compiler should reject it. This isn't done now. After all, this patch would stop a crash. Reviewed By: iains, aaron.ballman, dblaikie Differential Revision: https://reviews.llvm.org/D120397
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
0 files changed, 0 insertions, 0 deletions