From 312ccf761c034483f6bdcd659c44f56bc9818d96 Mon Sep 17 00:00:00 2001 From: Jan Sjodin Date: Thu, 14 Sep 2017 20:53:51 +0000 Subject: Add AddresSpace to PseudoSourceValue. Differential Revision: https://reviews.llvm.org/D35089 llvm-svn: 313297 --- llvm/lib/CodeGen/MachineInstr.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/MachineInstr.cpp') 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()) return 0; + if (V.isNull()) return 0; + + if (V.is()) + return V.get()->getAddressSpace(); + return cast(V.get()->getType())->getAddressSpace(); } -- cgit v1.2.3