[PATCH] D76571: [mlir] Start simple C++ backend

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 22 23:57:54 PDT 2020


rriddle added inline comments.


================
Comment at: mlir/include/mlir/Target/Cpp.h:115
+private:
+  friend struct Scope;
+  using ValMapper = llvm::ScopedHashTable<Value, std::string>;
----------------
jpienaar wrote:
> rriddle wrote:
> > I don't think this friend declaration is necessary.
> It is required for valueInScopeCount access (which honestly is more to enable making it simple to reuse variable numbers).
What I mean is, the elements of a class already visible to nested classes(i.e. implicitly friend):
https://stackoverflow.com/questions/14758881/access-of-nested-classes-which-behave-like-friends-but-arent/14759027#14759027


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76571/new/

https://reviews.llvm.org/D76571





More information about the llvm-commits mailing list