[PATCH] D38473: Include getting generated struct offsets in CodegenABITypes

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 3 19:08:43 PDT 2017


rjmccall added inline comments.


================
Comment at: include/clang/CodeGen/CodeGenABITypes.h:81
 
+// Returns a field number for a struct suitable for GEP'ing
+unsigned getFieldNumber(CodeGenModule &CGM,
----------------
"Given a non-bitfield struct field, return its index within the elements of the struct's converted type."


================
Comment at: include/clang/CodeGen/CodeGenABITypes.h:83
+unsigned getFieldNumber(CodeGenModule &CGM,
+                        const RecordDecl *RD, const FieldDecl *FD);
+
----------------
I think "getLLVMFieldNumber" is probably the right name for this.


https://reviews.llvm.org/D38473





More information about the cfe-commits mailing list