[PATCH] D37054: Require address space to be specified when creating functions (2/3)
Dylan McKay via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 14 08:57:02 PDT 2018
dylanmckay abandoned this revision.
dylanmckay added inline comments.
Herald added subscribers: dexonsmith, jrtc27.
================
Comment at: lib/AsmParser/LLParser.cpp:4893
FunctionType::get(RetType, ParamTypeList, isVarArg);
PointerType *PFT = PointerType::getUnqual(FT);
----------------
arichardson wrote:
> As @bjope says this should use `PointerType::get(FT, AddrSpace)`
>
> In our fork (https://github.com/CTSRD-CHERI/llvm / https://github.com/CTSRD-CHERI/clang) I have removed all uses of `PointerType::getUnqual()` from clang and most of them from LLVM since they almost always cause issues for us.
It looks like there are quite a few `getUnqual` calls around the codebase which are likely to lose information.
A quick grep shows <~80
I wonder if it's worth refactoring the `getUnqual` method to make it harder to misuse.
Repository:
rL LLVM
https://reviews.llvm.org/D37054
More information about the llvm-commits
mailing list