[PATCH] D69779: -fmodules-codegen should not emit extern templates

2020-01-14 Thread Luboš Luňák via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG729530f68fe1: -fmodules-codegen should not emit extern templates (authored by llunak). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69779/new/ https://revi

[PATCH] D69779: -fmodules-codegen should not emit extern templates

2020-01-14 Thread David Blaikie via Phabricator via cfe-commits
dblaikie accepted this revision. dblaikie added a comment. This revision is now accepted and ready to land. Looks good - thanks for your patience! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69779/new/ https://reviews.llvm.org/D69779 ___

[PATCH] D69779: -fmodules-codegen should not emit extern templates

2020-01-14 Thread Luboš Luňák via Phabricator via cfe-commits
llunak updated this revision to Diff 238089. llunak added a comment. This version uses a module based on the code posted above. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69779/new/ https://reviews.llvm.org/D69779 Files: clang/lib/Serialization/ASTWriterDecl.cpp clang/test/Modul

[PATCH] D69779: -fmodules-codegen should not emit extern templates

2020-01-14 Thread Luboš Luňák via Phabricator via cfe-commits
llunak updated this revision to Diff 238086. llunak added a comment. I've updated the test as requested. However I've noticed that a PCH-based test for this relies on https://reviews.llvm.org/D69585 . The fix works (of course), but it requires a PCH/module with the instantiation. CHANGES SINC

[PATCH] D69779: -fmodules-codegen should not emit extern templates

2020-01-13 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/test/PCH/codegen-extern-template.cpp:1-9 +// Build the PCH with extern template. +// RUN: %clang -x c++-header %S/codegen-extern-template.h -o %t.pch -Xclang -building-pch-with-obj -Xclang -fmodules-codegen +// Build the PCH's ob

[PATCH] D69779: -fmodules-codegen should not emit extern templates

2020-01-13 Thread Luboš Luňák via Phabricator via cfe-commits
llunak added a comment. Do you need some more information about the patch? It'd be nice if this could make it into 10.0. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69779/new/ https://reviews.llvm.org/D69779 ___ c

[PATCH] D69779: -fmodules-codegen should not emit extern templates

2020-01-07 Thread Luboš Luňák via Phabricator via cfe-commits
llunak added a comment. In D69779#1801771 , @dblaikie wrote: > Ah, if I mark the standalone function template 'inline' (the implicit linkage > of member functions) then I get the same failure for both. Haven't tested > whether the fix is the same fix for

[PATCH] D69779: -fmodules-codegen should not emit extern templates

2020-01-02 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Hey - thanks for this! Does look like it reproduces in modules: foo.h: #pragma once template struct outer { static void func() { } }; template void func() { } extern template struct outer; extern template void func(); inline void cal

[PATCH] D69779: -fmodules-codegen should not emit extern templates

2019-12-05 Thread Luboš Luňák via Phabricator via cfe-commits
llunak added a comment. Ping. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69779/new/ https://reviews.llvm.org/D69779 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D69779: -fmodules-codegen should not emit extern templates

2019-11-03 Thread Luboš Luňák via Phabricator via cfe-commits
llunak created this revision. llunak added a reviewer: dblaikie. llunak added a project: clang. Herald added a subscriber: cfe-commits. See the test for a testcase. If a header contains 'extern template', then the template should be provided somewhere by an explicit instantiation, so it is not n