[PATCH] D11969: Avoid using of DataLayout::getPointerSize() without address space argument in DWARF info generation

Stanislav Mekhanoshin via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 11 22:52:54 PDT 2015


rampitec added a comment.

In http://reviews.llvm.org/D11969#222471, @joker.eph wrote:

> What is the semantic of this pointer size? Especially if you have multiple pointer sizes depending on the address space?
>  Also how does the value returned by MAI::getPointerSize() relates to the DataLayout and/or the TargetMachine getPointerSize()?
>  The fact that they differs sounds fishy to me.
>  The fact that the semantic of MAI::getPointerSize() is not well defined is scary to me as well. This looks like something that needs to go away to me, and I'm scared that you want to use it for anything at this point.


That is really target specific and target can specify it as it wants. In our case we say this is the maximum possible size of the pointer. I would agree, that would be nice if dwarf could differentiate between pointers of different types, but that does not seem to be case now. For sure where we can differentiate this should not be used at all.


Repository:
  rL LLVM

http://reviews.llvm.org/D11969





More information about the llvm-commits mailing list