[Utils] stripDebugifyMetadata - use cast<> instead of dyn_cast_or_null<> to avoid...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 25 Mar 2022 10:25:04 +0000 (10:25 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 25 Mar 2022 10:25:04 +0000 (10:25 +0000)
commit1a943923b8bc000ae03b22a05413918723d2d044
tree96943c5916327d7b46ae6da19fa58039d68575bd
parentae95f291e8d92bb7396219839efc0012a13378e1
[Utils] stripDebugifyMetadata - use cast<> instead of dyn_cast_or_null<> to avoid dereference of nullptr

The pointer is dereferenced immediately, so assert the cast is correct instead of returning nullptr
llvm/lib/Transforms/Utils/Debugify.cpp