[C++20] [Modules] Serialize the evaluated constant values for VarDecl
authorChuanqi Xu <yedeng.yd@linux.alibaba.com>
Wed, 24 May 2023 02:13:31 +0000 (10:13 +0800)
committerChuanqi Xu <yedeng.yd@linux.alibaba.com>
Wed, 24 May 2023 02:17:33 +0000 (10:17 +0800)
commitc0d6f85e3ae8bcfdb7217d165314f01c1a4af9ae
tree982ee63d6466adfe483857b7c20979ae56e53320
parentc8466ab7cbd18ebad4f66b33b1fbadeb823f019b
[C++20] [Modules] Serialize the evaluated constant values for VarDecl

Close https://github.com/llvm/llvm-project/issues/62796.

Previously, we didn't serialize the evaluated result for VarDecl. This
caused the compilation of template metaprogramming become slower than
expect. This patch fixes the issue.
clang/lib/Serialization/ASTReaderDecl.cpp
clang/lib/Serialization/ASTWriter.cpp
clang/unittests/Serialization/CMakeLists.txt
clang/unittests/Serialization/VarDeclConstantInitTest.cpp [new file with mode: 0644]