The API for getting PointerType objects has just changed to make Embedded C address space information explicit. The old semantics of PointerType::get() now apply to PointerType::getUnqual(), which returns a pointer in the generic address space. PointerType::get() now requires both a type and an address space.
The clang, llvm-gcc-4.0, and llvm-gcc-4.2, and internal llvm projects have all been updated to take this API change into account.
The only current omission is the C interface to the LLVM type system, which has not yet been updated to preserve or expose address spaces on PointerType’s. I’m hoping for a little help with that.
Thanks
I've already written that locally and am updating the Ocaml bindings, so don't worry that point much.
— Gordon
The API for getting PointerType objects has just changed to make Embedded C address space information explicit. The old semantics of PointerType::get() now apply to PointerType::getUnqual(), which returns a pointer in the generic address space. PointerType::get() now requires both a type and an address space.
The clang, llvm-gcc-4.0, and llvm-gcc-4.2, and internal llvm projects have all been updated to take this API change into account.
The only current omission is the C interface to the LLVM type system, which has not yet been updated to preserve or expose address spaces on PointerType’s. I’m hoping for a little help with that.
Hi Cristopher,
I ran aground of this mildly:
$ Release/bin/llvm-as <<END_OF_LL | Release/bin/llvm-dis
%Gnric = type i8*
%Qual3 = type i8 addrspace(3)*
%Qual5 = type i8 addrspace(5)*
END_OF_LL
; ModuleID = ‘’
%Gnric = type i8*
%Qual3 = type i8*
%Qual5 = type i8*
It looks to be purely a problem in llvm-dis output since the three types would fold internally to the llvm-dis process if the qualifiers did not survive through the input phase.
Please revert r45097 when you get this working.
Thanks!
Gordon