r293518 - [ASTMatchers] Sprinkle some constexpr on the global matcher constructors.
Alex L via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 1 03:03:47 PST 2017
Hi Benjamin,
This commit has caused a linking in our stage 2 modules buildbot at
http://lab.llvm.org:8080/green/job/clang-stage2-cmake-modulesRDA/.
Specifically, after this commit 'clang-reorder-fields' gets the following
linking error:
FAILED: bin/clang-reorder-fields
: && /Users/buildslave/jenkins/sharedspace/clang-stage2-cmake-modulesRDA at 2/host-compiler/bin/clang++
-fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter
-Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic
-Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor
-Wdelete-non-virtual-dtor -Wstring-conversion -Werror=date-time -std=c++11
-fmodules
-fmodules-cache-path=/Users/buildslave/jenkins/sharedspace/clang-stage2-cmake-modulesRDA at 2/clang-build/module.cache
-fcxx-modules -gmodules -fcolor-diagnostics -fno-common
-Woverloaded-virtual -Wno-nested-anon-types -O2 -g -DNDEBUG
-Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-dead_strip
tools/clang/tools/extra/clang-reorder-fields/tool/CMakeFiles/clang-reorder-fields.dir/ClangReorderFields.cpp.o
-o bin/clang-reorder-fields lib/libLLVMSupport.a lib/libclangBasic.a
lib/libclangFrontend.a lib/libclangReorderFields.a lib/libclangRewrite.a
lib/libclangTooling.a lib/libclangToolingCore.a lib/libclangIndex.a
lib/libclangFrontend.a lib/libclangParse.a lib/libLLVMMCParser.a
lib/libclangSerialization.a lib/libclangSema.a lib/libclangEdit.a
lib/libclangAnalysis.a lib/libLLVMBitReader.a lib/libLLVMProfileData.a
lib/libclangDriver.a lib/libLLVMOption.a lib/libclangASTMatchers.a
lib/libclangFormat.a lib/libclangToolingCore.a lib/libclangRewrite.a
lib/libclangAST.a lib/libclangLex.a lib/libclangBasic.a lib/libLLVMCore.a
lib/libLLVMMC.a lib/libLLVMSupport.a -lcurses -lz -lm lib/libLLVMDemangle.a
-Wl,-rpath, at loader_path/../lib && :
Undefined symbols for architecture x86_64:
"clang::ast_matchers::recordDecl", referenced from:
clang::reorder_fields::(anonymous
namespace)::ReorderingConsumer::HandleTranslationUnit(clang::ASTContext&)
in libclangReorderFields.a(ReorderFieldsAction.cpp.o)
ld: symbol(s) not found for architecture x86_64
This might be a bug/regression in clang and modules since in my opinion the
link should succeed. I've reverted your commit in r293759 while we are
investigating.
Thanks,
Alex
On 30 January 2017 at 18:20, Benjamin Kramer via cfe-commits <
cfe-commits at lists.llvm.org> wrote:
> Author: d0k
> Date: Mon Jan 30 12:20:00 2017
> New Revision: 293518
>
> URL: http://llvm.org/viewvc/llvm-project?rev=293518&view=rev
> Log:
> [ASTMatchers] Sprinkle some constexpr on the global matcher constructors.
>
> This dramatically reduces the size of the global constructors we emit
> for those variables in debug mode.
>
> Modified:
> cfe/trunk/include/clang/ASTMatchers/ASTMatchersInternal.h
>
> Modified: cfe/trunk/include/clang/ASTMatchers/ASTMatchersInternal.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/
> clang/ASTMatchers/ASTMatchersInternal.h?rev=293518&r1=293517&r2=293518&
> view=diff
> ============================================================
> ==================
> --- cfe/trunk/include/clang/ASTMatchers/ASTMatchersInternal.h (original)
> +++ cfe/trunk/include/clang/ASTMatchers/ASTMatchersInternal.h Mon Jan 30
> 12:20:00 2017
> @@ -1459,7 +1459,7 @@ class VariadicDynCastAllOfMatcher
> : public VariadicFunction<BindableMatcher<SourceT>, Matcher<TargetT>,
> makeDynCastAllOfComposite<SourceT,
> TargetT>> {
> public:
> - VariadicDynCastAllOfMatcher() {}
> + constexpr VariadicDynCastAllOfMatcher() {}
> };
>
> /// \brief A \c VariadicAllOfMatcher<T> object is a variadic functor that
> takes
> @@ -1477,7 +1477,7 @@ class VariadicAllOfMatcher
> : public VariadicFunction<BindableMatcher<T>, Matcher<T>,
> makeAllOfComposite<T>> {
> public:
> - VariadicAllOfMatcher() {}
> + constexpr VariadicAllOfMatcher() {}
> };
>
> /// \brief Matches nodes of type \c TLoc for which the inner
> @@ -1598,7 +1598,7 @@ public:
>
> struct Func
> : public VariadicFunction<Self, Matcher<InnerTBase>, &Self::create>
> {
> - Func() {}
> + constexpr Func() {}
> };
>
> private:
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170201/fc5e726d/attachment.html>
More information about the cfe-commits
mailing list