summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/python_api/breakpoint/TestBreakpointAPI.py
diff options
context:
space:
mode:
authorVolodymyr Sapsai <vsapsai@apple.com>2017-12-21 19:42:37 +0000
committerVolodymyr Sapsai <vsapsai@apple.com>2017-12-21 19:42:37 +0000
commit614f3702d93a45aa421a547c365a66fe5aebde21 (patch)
tree7eddcef06f8c490093728629897a984f15aa71c5 /lldb/packages/Python/lldbsuite/test/python_api/breakpoint/TestBreakpointAPI.py
parent6ecd6a80880c9c0bb04f9b2520764aace2ac3cca (diff)
downloadbcm5719-llvm-614f3702d93a45aa421a547c365a66fe5aebde21.tar.gz
bcm5719-llvm-614f3702d93a45aa421a547c365a66fe5aebde21.zip
[CodeGen] Fix crash when a function taking transparent union is redeclared.
When a function taking transparent union is declared as taking one of union members earlier in the translation unit, clang would hit an "Invalid cast" assertion during EmitFunctionProlog. This case corresponds to function f1 in test/CodeGen/transparent-union-redecl.c. We decided to cast i32 to union because after merging function declarations function parameter type becomes int, CGFunctionInfo::ArgInfo type matches with ABIArgInfo type, so we decide it is a trivial case. But these types should also be castable to parameter declaration type which is not the case here. The fix is in checking for the trivial case if ABIArgInfo type matches with parameter declaration type. It exposed inconsistency that we check hasScalarEvaluationKind for different types in EmitParmDecl and EmitFunctionProlog, and comment says they should match. Additional tests in Sema/transparent-union.c capture current behavior and make sure there are no regressions. rdar://problem/34949329 Reviewers: rjmccall, rafael Reviewed By: rjmccall Subscribers: aemerson, cfe-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D41311 llvm-svn: 321296
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api/breakpoint/TestBreakpointAPI.py')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud