aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SelectionDAG
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
commita3518a1d6a6a9a7519d3a8d434cde51617c1dc22 (patch)
tree2e34ed8ef28cd919253491736c8e2e43c4a708bf /lib/CodeGen/SelectionDAG
parent672452d5a0dace689d7f9df9837c03afe3a74281 (diff)
downloadexternal_llvm-a3518a1d6a6a9a7519d3a8d434cde51617c1dc22.zip
external_llvm-a3518a1d6a6a9a7519d3a8d434cde51617c1dc22.tar.gz
external_llvm-a3518a1d6a6a9a7519d3a8d434cde51617c1dc22.tar.bz2
Add a public method called getAddressSpace() to the GlobalAddressSDNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70366 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 7c9a001..1c85e9d 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/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();