yaxunl added inline comments.

================
Comment at: lib/CodeGen/CGCall.cpp:1605
+              ? CGM.getDataLayout().getAllocaAddrSpace()
+              : getContext().getTargetAddressSpace(LangAS::Default));
       break;
----------------
rjmccall wrote:
> Everything about your reasoning seems to apply to normal indirect arguments, 
> too.
non-byval indirect argument is normally in default address space instead of 
alloca address space. For example,


```
struct A { int a;};
void f(A &x);
```
`x` is an indirect argument but should not be in alloca addr space, since the 
caller may pass a reference to a global variable.


https://reviews.llvm.org/D34367



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to