From 8c28be1b69a66f16fd1c711931b5a6f6948a8a2a Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Fri, 22 May 2020 23:43:44 +0100 Subject: fix(3p/nix/libexpr): Use gc_allocator as the btree_map allocator This will make all Attr values visible to the GC. --- third_party/nix/src/libexpr/attr-set.hh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'third_party/nix/src/libexpr') diff --git a/third_party/nix/src/libexpr/attr-set.hh b/third_party/nix/src/libexpr/attr-set.hh index caddc6bebd61..5837b5cbdc9c 100644 --- a/third_party/nix/src/libexpr/attr-set.hh +++ b/third_party/nix/src/libexpr/attr-set.hh @@ -2,10 +2,11 @@ #pragma once #include +#include #include "nixexpr.hh" #include "symbol-table.hh" -#include "types.hh" // TODO(tazjin): audit this include +#include "types.hh" namespace nix { // TODO(tazjin): ::expr @@ -29,6 +30,12 @@ inline bool operator==(const Attr& lhs, const Attr& rhs) { return lhs.name == rhs.name; } +// Convenience alias for the backing map, with the garbage-collecting +// allocator explicitly specified. +using AttributeMap = + absl::btree_map, + gc_allocator>>; + class Bindings { public: typedef absl::btree_map::iterator iterator; -- cgit 1.4.1