[PATCH] D57767: [opaque pointer types] Cleanup CGBuilder's Create*GEP.

James Y Knight via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 5 09:31:44 PST 2019


jyknight created this revision.
jyknight added a reviewer: dblaikie.
Herald added subscribers: cfe-commits, jfb, jholewinski.
Herald added a project: clang.

The various EltSize, Offset, DataLayout, and StructLayout arguments
are all computable from the Address's element type and the DataLayout
which the CGBuilder already has access to.

After having previously asserted that the computed values are the same
as those passed in, now remove the redundant arguments from
CGBuilder's Create*GEP functions.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D57767

Files:
  clang/lib/CodeGen/CGAtomic.cpp
  clang/lib/CodeGen/CGBlocks.cpp
  clang/lib/CodeGen/CGBuilder.h
  clang/lib/CodeGen/CGBuiltin.cpp
  clang/lib/CodeGen/CGCall.cpp
  clang/lib/CodeGen/CGCleanup.cpp
  clang/lib/CodeGen/CGDecl.cpp
  clang/lib/CodeGen/CGExpr.cpp
  clang/lib/CodeGen/CGExprAgg.cpp
  clang/lib/CodeGen/CGExprComplex.cpp
  clang/lib/CodeGen/CGNonTrivialStruct.cpp
  clang/lib/CodeGen/CGObjC.cpp
  clang/lib/CodeGen/CGObjCGNU.cpp
  clang/lib/CodeGen/CGObjCMac.cpp
  clang/lib/CodeGen/CGOpenMPRuntime.cpp
  clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
  clang/lib/CodeGen/CGStmtOpenMP.cpp
  clang/lib/CodeGen/ItaniumCXXABI.cpp
  clang/lib/CodeGen/TargetInfo.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57767.185335.patch
Type: text/x-patch
Size: 63826 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190205/f178dcfa/attachment-0001.bin>


More information about the cfe-commits mailing list