summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorYaxun Liu <Yaxun.Liu@amd.com>2017-04-17 20:10:44 +0000
committerYaxun Liu <Yaxun.Liu@amd.com>2017-04-17 20:10:44 +0000
commitd7523283a7198d0e919f8ada0eeadddef3ccbaaa (patch)
treed355616dd0c86ad1e2a8b81e6097d8a63a8215d3 /clang/lib/CodeGen
parentef700d550e7349c94081c1dc93eac6a5be2fc1f5 (diff)
downloadbcm5719-llvm-d7523283a7198d0e919f8ada0eeadddef3ccbaaa.tar.gz
bcm5719-llvm-d7523283a7198d0e919f8ada0eeadddef3ccbaaa.zip
CodeGen: Let byval parameter use alloca address space
Differential Revision: https://reviews.llvm.org/D32133 llvm-svn: 300487
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGCall.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index 8af32055fc4..8e25dc2cd70 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -1586,9 +1586,10 @@ CodeGenTypes::GetFunctionType(const CGFunctionInfo &FI) {
case ABIArgInfo::Indirect: {
assert(NumIRArgs == 1);
- // indirect arguments are always on the stack, which is addr space #0.
+ // indirect arguments are always on the stack, which is alloca addr space.
llvm::Type *LTy = ConvertTypeForMem(it->type);
- ArgTypes[FirstIRArg] = LTy->getPointerTo();
+ ArgTypes[FirstIRArg] = LTy->getPointerTo(
+ CGM.getDataLayout().getAllocaAddrSpace());
break;
}
OpenPOWER on IntegriCloud