================
@@ -1390,7 +1390,19 @@ class ASTReader
/// predefines buffer may contain additional definitions.
std::string SuggestedPredefines;
- llvm::DenseMap<const Decl *, bool> DefinitionSource;
+ struct DefinitionSourceFlags {
+ ExtKind HasExternalDefinitions : 2;
+
+ /// Indicates if given function declaration was a definition but its body
+ /// was removed due to declaration merging.
+ bool ThisDeclarationWasADefinition : 1;
+
+ DefinitionSourceFlags()
+ : HasExternalDefinitions(EK_ReplyHazy),
+ ThisDeclarationWasADefinition(false) {}
+ };
+
+ llvm::DenseMap<const Decl *, DefinitionSourceFlags> DefinitionSource;
----------------
dmpolukhin wrote:
I think memory overhead for another map will be higher. The value_type was bool
but in reality at least 4-8 bytes were allocated for it so converting it to
struct with 3 bits only shouldn't take extra space.
https://github.com/llvm/llvm-project/pull/132214
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits