Skip to content

Commit 72368d5

Browse files
committed
Fix returned objects by value attributed with inalloca
For more details see https://llvm.org/docs/InAlloca.html. This specific crash happened on Win 32 only. Signed-off-by: Dimitar Dobrev <[email protected]>
1 parent 1fc1b4e commit 72368d5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/CppParser/Parser.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -3284,7 +3284,8 @@ void Parser::WalkFunction(const clang::FunctionDecl* FD, Function* F,
32843284
return;
32853285

32863286
auto& CGInfo = GetCodeGenFunctionInfo(codeGenTypes, FD);
3287-
F->isReturnIndirect = CGInfo.getReturnInfo().isIndirect();
3287+
F->isReturnIndirect = CGInfo.getReturnInfo().isIndirect() ||
3288+
CGInfo.getReturnInfo().isInAlloca();
32883289

32893290
unsigned Index = 0;
32903291
for (const auto& Arg : CGInfo.arguments())

0 commit comments

Comments
 (0)