================ @@ -0,0 +1,406 @@ +//===- TUSummaryEncoding.cpp --------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "JSONFormatImpl.h" + +#include "clang/Analysis/Scalable/EntityLinker/EntitySummaryEncoding.h" +#include "clang/Analysis/Scalable/EntityLinker/TUSummaryEncoding.h" + +namespace clang::ssaf { + +//---------------------------------------------------------------------------- +// JSONEntitySummaryEncoding +//---------------------------------------------------------------------------- + +namespace { + +class JSONEntitySummaryEncoding : public EntitySummaryEncoding { +public: + explicit JSONEntitySummaryEncoding(Value Data) : Data(std::move(Data)) {} + + void + patch(const std::map<EntityId, EntityId> &EntityResolutionTable) override { + llvm_unreachable("not implemented"); + } ---------------- steakhal wrote:
When I see polimorphic classes, I always wonder what can be overridden. I suspect that `JSONEntitySummaryEncoding` wants to be `final`. It's not designed to be extended further. What is the point of this `llvm_unreachable` here? The comment explains what I can already see: well, it's not implemented. Why? Should be? What's the benefit of using `unreachable` here instead of just an `assert(false)`? Remember, hitting an `unreachable` is UB, and as such, it enables the compiler to time-travel-optimize with this. Because of this, personally, I'd probably just add an `assert(false)` here. https://github.com/llvm/llvm-project/pull/183401 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
