Browse Source

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 <dpldobrev@protonmail.com>
pull/1227/head
Dimitar Dobrev 6 years ago
parent
commit
72368d5050
  1. 3
      src/CppParser/Parser.cpp

3
src/CppParser/Parser.cpp

@ -3284,7 +3284,8 @@ void Parser::WalkFunction(const clang::FunctionDecl* FD, Function* F, @@ -3284,7 +3284,8 @@ void Parser::WalkFunction(const clang::FunctionDecl* FD, Function* F,
return;
auto& CGInfo = GetCodeGenFunctionInfo(codeGenTypes, FD);
F->isReturnIndirect = CGInfo.getReturnInfo().isIndirect();
F->isReturnIndirect = CGInfo.getReturnInfo().isIndirect() ||
CGInfo.getReturnInfo().isInAlloca();
unsigned Index = 0;
for (const auto& Arg : CGInfo.arguments())

Loading…
Cancel
Save