summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff options
context:
space:
mode:
authorSanjiv Gupta <sanjiv.gupta@microchip.com>2009-04-29 04:43:24 +0000
committerSanjiv Gupta <sanjiv.gupta@microchip.com>2009-04-29 04:43:24 +0000
commitccd30945f9b3fedbb1596f3098b07dc95510ff97 (patch)
tree871cba6c4e32fdfcae397d8935ae00b58a3719b8 /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parente525dc3c6601596d8570115cb0567c6c2dc69e40 (diff)
downloadbcm5719-llvm-ccd30945f9b3fedbb1596f3098b07dc95510ff97.tar.gz
bcm5719-llvm-ccd30945f9b3fedbb1596f3098b07dc95510ff97.zip
Add a public method called getAddressSpace() to the GlobalAddressSDNode.
llvm-svn: 70366
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 7c9a00135a1..1c85e9d743e 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -5649,6 +5649,13 @@ void SDNode::dumpr() const {
DumpNodesr(errs(), this, 0, 0, once);
}
+
+// getAddressSpace - Return the address space this GlobalAddress belongs to.
+unsigned GlobalAddressSDNode::getAddressSpace() const {
+ return getGlobal()->getType()->getAddressSpace();
+}
+
+
const Type *ConstantPoolSDNode::getType() const {
if (isMachineConstantPoolEntry())
return Val.MachineCPVal->getType();
OpenPOWER on IntegriCloud