================ @@ -0,0 +1,46 @@ +//===- ASTMapping.h - AST to SSAF Entity mapping ----------------*- C++ -*-===// +// +// 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 +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_ANALYSIS_SCALABLE_ASTMAPPING_H +#define LLVM_CLANG_ANALYSIS_SCALABLE_ASTMAPPING_H + +#include "clang/Analysis/Scalable/Model/EntityName.h" +#include "clang/AST/Decl.h" +#include "llvm/ADT/StringRef.h" +#include <optional> + +namespace clang { +namespace ssaf { + ---------------- ymand wrote:
For both of these lookup functions -- I expect these to be used heavily in analysis, so it would be beneficial if they were shorter names. Currently, the names encode a lot of the (existing) type information. Is that necessary/helpful? Could you instead go with a simpler scheme like `getEntity` and `getReturnEntity`? Separately: constructing these is typically expensive, so we use a cache. Consider including a cache object in this library as well. I think that will be the correct choice for most use cases. https://github.com/llvm/llvm-project/pull/169131 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
