summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorJan Sjodin <jan_sjodin@yahoo.com>2017-09-14 20:53:51 +0000
committerJan Sjodin <jan_sjodin@yahoo.com>2017-09-14 20:53:51 +0000
commit312ccf761c034483f6bdcd659c44f56bc9818d96 (patch)
treeed9b9d8ec4c3adfa76dbed215779cc942c84dd5d /llvm/lib/CodeGen/MachineInstr.cpp
parentf65177a41f6688a79c88aaddefcdc484258c2142 (diff)
downloadbcm5719-llvm-312ccf761c034483f6bdcd659c44f56bc9818d96.tar.gz
bcm5719-llvm-312ccf761c034483f6bdcd659c44f56bc9818d96.zip
Add AddresSpace to PseudoSourceValue.
Differential Revision: https://reviews.llvm.org/D35089 llvm-svn: 313297
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index 47926d6cf0e..6684f4e5d1c 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -579,7 +579,11 @@ LLVM_DUMP_METHOD void MachineOperand::dump() const {
/// getAddrSpace - Return the LLVM IR address space number that this pointer
/// points into.
unsigned MachinePointerInfo::getAddrSpace() const {
- if (V.isNull() || V.is<const PseudoSourceValue*>()) return 0;
+ if (V.isNull()) return 0;
+
+ if (V.is<const PseudoSourceValue*>())
+ return V.get<const PseudoSourceValue*>()->getAddressSpace();
+
return cast<PointerType>(V.get<const Value*>()->getType())->getAddressSpace();
}
OpenPOWER on IntegriCloud