Make value of static_objects_ a pointer.
PiperOrigin-RevId: 458414329
diff --git a/lifetime_analysis/object_repository.cc b/lifetime_analysis/object_repository.cc
index 70ade1c..7ddfb05 100644
--- a/lifetime_analysis/object_repository.cc
+++ b/lifetime_analysis/object_repository.cc
@@ -687,17 +687,17 @@
Object ObjectRepository::CreateStaticObject(clang::QualType type) {
auto iter = static_objects_.find(type);
if (iter != static_objects_.end()) {
- return iter->second;
+ return *iter->second;
}
- Object object = *CreateObject(Lifetime::Static(), type);
+ const Object* object = CreateObject(Lifetime::Static(), type);
static_objects_[type] = object;
CreateObjects(
- object, type, [](const clang::Expr*) { return Lifetime::Static(); },
+ *object, type, [](const clang::Expr*) { return Lifetime::Static(); },
true);
- return object;
+ return *object;
}
void ObjectRepository::CreateObjects(Object root_object, clang::QualType type,