[PATCH] D136017: [clang][Interp] Materializing primitive temporaries

Shafik Yaghmour via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 20 16:34:36 PDT 2022


shafik added inline comments.


================
Comment at: clang/lib/AST/Interp/Interp.h:574
+/// 3) Initialized global with index \I with that
+template <PrimType Name, class T = typename PrimConv<Name>::T>
+bool InitGlobalTemp(InterpState &S, CodePtr OpPC, uint32_t I,
----------------
tbaeder wrote:
> shafik wrote:
> > Is `Name` really a `TypeName`?
> Not sure I understand the question, that's just the pattern for templating that's used for all the interp functions. `Name` is our `PrimType` and `T` is the underlying type we use, as defined in `PrimConv`.
I realize that this is the convention we have been using but it struck me (maybe I am wrong) that `Name` really is a type name and now I can't unsee it. 


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

https://reviews.llvm.org/D136017



More information about the cfe-commits mailing list