diff options
| author | Sanjiv Gupta <sanjiv.gupta@microchip.com> | 2009-04-29 04:43:24 +0000 |
|---|---|---|
| committer | Sanjiv Gupta <sanjiv.gupta@microchip.com> | 2009-04-29 04:43:24 +0000 |
| commit | ccd30945f9b3fedbb1596f3098b07dc95510ff97 (patch) | |
| tree | 871cba6c4e32fdfcae397d8935ae00b58a3719b8 /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
| parent | e525dc3c6601596d8570115cb0567c6c2dc69e40 (diff) | |
| download | bcm5719-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.cpp | 7 |
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(); |

