[llvm-dev] Determine the offset of a vtable ptr
Gaier, Bjoern via llvm-dev
llvm-dev at lists.llvm.org
Fri May 3 00:02:45 PDT 2019
inspired by a Mail some days ago I wondered, if it is possible to determine the offset of a pointer to a specific vtable of a class via the llvm::Module.
For this I created two classes A & B which both used virtual functions. Now I created a class C which inherits A & B. In my simple understanding of C++ class 'C' would have two additional vtable pointers for A & B - and I would want to know there offset.
I compiled the code the LLVM assembly and tried to locate the offset there. Sadly - I was not possible to understand the assembly well enough to find those offsets. Because of this, I was not even able to try this via the functions of the llvm::Module.
So... Is that possible? And how would I do this via llvm::Module?
I'm really sorry if this question a duplication of if the answers if obvious. I'm not much experienced with the LLVM at all.
Thank you in advance
Als GmbH eingetragen im Handelsregister Bad Homburg v.d.H. HRB 9816, USt.ID-Nr. DE 114 165 789 Geschäftsführer: Dr. Hiroshi Nakamura, Dr. Robert Plank, Markus Bode, Heiko Lampert, Takashi Nagano, Takeshi Fukushima. Junichi Tajika
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev