[PATCH] D22642: CodeGen: Clean up implementation of vtable initializer builder. NFC.
Peter Collingbourne via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 7 18:23:09 PDT 2016
pcc marked 4 inline comments as done.
Comment at: lib/CodeGen/CGVTables.cpp:588
@@ +587,3 @@
+ if (auto *F = dyn_cast<llvm::Function>(Cache))
+ Cache = llvm::ConstantExpr::getBitCast(Cache, CGM.Int8PtrTy);
> Do you have any idea why we're doing this? It looks wrong to me. These ABI entry points are exposed and could certainly have their addresses taken and used in this translation unit.
I introduced this in D18071. Although a translation unit can take the address of one of these functions, that would involve declaring a function with a reserved name, so I believe we'd be allowed to impose restrictions such as `unnamed_addr` on the address.
More information about the cfe-commits