[PATCH] D119215: [clang] Properly cache member pointer LLVM types

Arthur Eubanks via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 7 22:05:10 PST 2022


aeubanks created this revision.
aeubanks requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

When not going through the main Clang->LLVM type cache, we'd
accidentally create multiple different opaque types for a member pointer
type.

This allows us to remove the -verify-type-cache flag now that
check-clang passes with it on. We can do the verification in expensive
builds. Previously microsoft-abi-member-pointers.cpp was failing with
-verify-type-cache.

I suspect that there may be more issues when we have multiple member
pointer types and we clear the cache, but we can leave that for later.

Followup to D118744 <https://reviews.llvm.org/D118744>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D119215

Files:
  clang/lib/CodeGen/CodeGenTypes.cpp
  clang/lib/CodeGen/CodeGenTypes.h
  clang/test/CodeGenCXX/type-cache-2.cpp
  clang/test/CodeGenCXX/type-cache-3.cpp
  clang/test/CodeGenCXX/type-cache.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119215.406704.patch
Type: text/x-patch
Size: 4272 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220208/2af54a78/attachment-0001.bin>


More information about the cfe-commits mailing list