[PATCH] D136017: [clang][Interp] Materializing primitive temporaries
Timm Bäder via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 21 03:37:46 PDT 2022
tbaeder 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,
----------------
shafik wrote:
> 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.
`Name` is the `PrimType`, so will be e.g. `Sint32` in the end, `T` is then the integral type we use for it, e.g. `Integral<32, true>`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136017/new/
https://reviews.llvm.org/D136017
More information about the cfe-commits
mailing list