Every GlobalAddress has a GlobalValue, Every GlobalValue is a PointerType, Every PointerType has an AddressSpace. So is it ok to add a method getAddressSpace in GlobalAddressSDNode class itself? Currently we have to do GSDN->getGlobal()->getType()->getAddressSpace(). - Sanjiv
On Apr 28, 2009, at 7:57 AM, Sanjiv Gupta wrote:> Every GlobalAddress has a GlobalValue, Every GlobalValue is a > PointerType, Every PointerType has an AddressSpace. So is it ok to > add a > method getAddressSpace in GlobalAddressSDNode class itself? > > Currently we have to do GSDN->getGlobal()->getType()- > >getAddressSpace().Yep, go for it. However, if it would require adding a #include to globalvalue.h, then please avoid this by making the method out-of-line. Thanks Sanjiv, -Chris