Files
clang-p2996/llvm/lib/Target/NVPTX/NVPTXUtilities.cpp
Luke Drummond 940fa35ece [NVPTX] Fix a segfault for bitcasted calls with byval params
`getFunctionParamOptimizedAlign` was being passed a null function
argument when getting the callee of a bitcasted function symbol. This is
because `CallBase::getCalledFunction` does not look through bitcasts.

There is already code to handle this case in
`NVPTXTargetLowering::getArgumentAlignment`, which is now hoisted into
an NVPTX util.

The alignment computation now gracefully handles computing alignment of
virtual functions with a check for null.
2022-10-11 15:12:25 +01:00

9.5 KiB