ychen added inline comments. Herald added subscribers: jsji, Enna1.
================ Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1843 + + auto *FTRTTIProxy = new llvm::GlobalVariable( + TheModule, Addr->getType(), ---------------- pcc wrote: > ychen wrote: > > pcc wrote: > > > Are these proxy variables necessary? I think that now that we have custom > > > code generation for this you should be able to use a GOTPCREL relocation > > > to refer to the global. > > I attempted the GOTPCREL approach in a local branch. It didn't work for a > > reason that I couldn't remember off the top of my head. I'll find out. > > > > > I think that now that we have custom code generation for this > > > > Sorry, I don't quite follow which `custom code generation` you are > > referring to. Do you mean the changes in `AsmPrinter.cpp`? > > Sorry, I don't quite follow which custom code generation you are referring > > to. Do you mean the changes in AsmPrinter.cpp? > > Yes, that's what I meant. @pcc, I looked into my local branch that uses PCREL approach. It is not simpler/cleaner than the current approach due to the X86/X86-64, macho/ELF difference. These need their specific relocation types. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115844/new/ https://reviews.llvm.org/D115844 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits