AddressSpace of a GlobalAddress

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

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,