[PATCH] D153092: [Clang][CodeGen]`vtable`, `typeinfo` et al. are globals

Bjorn Pettersson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 19 17:08:00 PDT 2023


bjope added inline comments.


================
Comment at: clang/lib/CodeGen/CGVTables.cpp:693
     return Int32Ty;
-  return Int8PtrTy;
+  return GlobalsInt8PtrTy;
 }
----------------
I noticed that we have some old fixes downstream that conflicts with the changes you've made here. I thought that perhaps we could get rid of those now when you've fixed the code upstream.

Isn't the VTable holding function pointers when not using the relative layout, and then this should be a pointer to the ProgramAddressSpace and not a pointer to the DefaultGlobalsAddressSpace?

Downstream we've been using a special `FnVoidPtrTy` here. Defined as `FnVoidPtrTy = Int8Ty->getPointerTo(DL.getProgramAddressSpace());`.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D153092



More information about the cfe-commits mailing list