[AsmPrinter] AIXException::endFunction - use cast<> instead of dyn_cast<> to avoid...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 25 Mar 2022 10:23:22 +0000 (10:23 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 25 Mar 2022 10:23:30 +0000 (10:23 +0000)
commitae95f291e8d92bb7396219839efc0012a13378e1
tree1313081692c903be1177cdf75b70a5941e9300e7
parentce2b36e123e7b5312016b09c1b2971c9d80416e7
[AsmPrinter] AIXException::endFunction - use cast<> instead of dyn_cast<> to avoid dereference of nullptr

The pointer is used immediately inside the getSymbol() call, so assert the cast is correct instead of returning nullptr
llvm/lib/CodeGen/AsmPrinter/AIXException.cpp