Go to file
Martin Storsjo da93dec330 [MinGW] Don't let template instantiation declarations cover nested classes
An explicit template instantiation declaration used to let
callers assume both outer and nested classes instantiations were
defined in a different translation unit.

If the instantiation is marked dllexport, only the outer class
is exported, but the caller will try to reference the instantiation
of both outer and inner classes.

This makes MinGW mode match both MSVC and Windows Itanium, by
having instantations only cover the outer class, and locally emitting
definitions of the nested classes. Windows Itanium was changed to
use this behavious in SVN r300804.

This deviates from what GCC does, but should be safe (and only
inflate the object file size a bit, but MSVC and Windows Itanium
modes do the same), and fixes cases where inner classes aren't
dllexported.

This fixes missing references in combination with dllexported/imported
template intantiations.

GCC suffers from the same issue, reported at [1], but the issue
is still unresolved there. The issue can probably be solved either
by making dllexport cover all nested classes as well, or this
way (matching MSVC).

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89087

Differential Revision: https://reviews.llvm.org/D61175

llvm-svn: 359342
2019-04-26 19:31:39 +00:00
clang [MinGW] Don't let template instantiation declarations cover nested classes 2019-04-26 19:31:39 +00:00
clang-tools-extra Fix typo in documentation. 2019-04-26 17:56:22 +00:00
compiler-rt [Sanitizer][Windows] Speculative fix for broken build on Windows 2019-04-26 19:06:55 +00:00
debuginfo-tests Set config.lit_tools_dir, which is needed by lit.llvm.initialize. 2018-11-06 21:54:27 +00:00
libclc travis: Add LLVM-8 build 2019-03-27 21:28:31 +00:00
libcxx Add '_LIBCPP_ASSERT(ready())' to several match_results method that have this precondtion. Fix several tests which did not honor this precondition. Thanks to Andrey Maksimov for pointing this out. 2019-04-26 17:10:03 +00:00
libcxxabi Fix compilation error with -DLIBCXXABI_ENABLE_THREADS=OFF 2019-04-25 09:27:50 +00:00
libunwind [NFC] Fix typo in debug log 2019-04-22 15:40:50 +00:00
lld [LLD][ELF] - Do not remove empty sections referenced in LOADADDR/ADDR commands. 2019-04-26 06:59:30 +00:00
lldb [ScriptInterpreter] Pass the debugger instead of the command interpreter 2019-04-26 17:58:19 +00:00
llgo IR: Support parsing numeric block ids, and emit them in textual output. 2019-03-22 18:27:13 +00:00
llvm [AsmPrinter] refactor to support %c w/ GlobalAddress' 2019-04-26 18:45:04 +00:00
openmp [OPENMP][NVPTX]Correctly handle L2 parallelism in SPMD mode. 2019-04-26 19:30:34 +00:00
parallel-libs Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
polly Apply include-what-you-use #include removal suggestions. NFC. 2019-03-28 20:19:49 +00:00
pstl [pstl] Make the default backend be the serial backend and always provide parallel policies 2019-04-24 20:12:36 +00:00
.arcconfig Update monorepo .arcconfig with new project callsign. 2019-01-31 14:34:59 +00:00
.clang-format Add .clang-tidy and .clang-format files to the toplevel of the 2019-01-29 16:43:16 +00:00
.clang-tidy Disable tidy checks with too many hits 2019-02-01 11:20:13 +00:00
.gitignore Add a reduced copy of the llvm .gitignore 2019-04-09 00:52:49 +00:00
README.md

README.md

The LLVM Compiler Infrastructure

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.