From 243efd7ac348dcabcdd990689618639fdadf592f Mon Sep 17 00:00:00 2001 From: Pete Cooper Date: Mon, 21 May 2012 23:21:28 +0000 Subject: Added address space qualifier to intrinsic PointerType arguments. llvm-svn: 157218 --- llvm/lib/VMCore/Function.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'llvm/lib/VMCore/Function.cpp') diff --git a/llvm/lib/VMCore/Function.cpp b/llvm/lib/VMCore/Function.cpp index 5a2a56637e6..6339c6791d4 100644 --- a/llvm/lib/VMCore/Function.cpp +++ b/llvm/lib/VMCore/Function.cpp @@ -388,8 +388,11 @@ static Type *DecodeFixedType(unsigned &NextElt, ArrayRef Infos, return VectorType::get(DecodeFixedType(NextElt, Infos, Tys, Context), 16); case IIT_V32: return VectorType::get(DecodeFixedType(NextElt, Infos, Tys, Context), 32); - case IIT_PTR: - return PointerType::getUnqual(DecodeFixedType(NextElt, Infos, Tys,Context)); + case IIT_PTR: { + unsigned AddrSpace = Infos[NextElt++]; + Type *PtrTy = DecodeFixedType(NextElt, Infos, Tys,Context); + return PointerType::get(PtrTy, AddrSpace); + } case IIT_ARG: case IIT_EXTEND_VEC_ARG: case IIT_TRUNC_VEC_ARG: { -- cgit v1.2.3