[PATCH] D36916: Associate functions with address spaces

Dylan McKay via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 18 21:03:51 PDT 2017


dylanmckay added inline comments.


================
Comment at: include/llvm/IR/DerivedTypes.h:106
+  FunctionType(Type *Result, ArrayRef<Type*> Params, bool IsVarArgs,
+               unsigned AddrSpace);
 
----------------
I worry that other LLVM developers will see `AddrSpace` and naively enter `0`, which would break all Harvard architectures.

One way around this could be make the ctor take a `DataLayout` instead, but you shouldn't really need one to construct this.

Any ideas are very welcome!


https://reviews.llvm.org/D36916





More information about the llvm-commits mailing list