[lldb] PdbAstBuilder - use cast<> instead of dyn_cast<> to avoid dereference of nullptr
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 23 Jan 2022 15:11:08 +0000 (15:11 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 23 Jan 2022 15:11:08 +0000 (15:11 +0000)
commitd7aa402b4b8a325a68c20d0300ac6bc664766be0
tree5f4d22298a8ba2a294fc8f4f312f27fe32c8234e
parentc93491352cf3146559de7755283f0dd259392126
[lldb] PdbAstBuilder - use cast<> instead of dyn_cast<> to avoid dereference of nullptr

The pointers are dereferenced immediately, so assert the cast is correct instead of returning nullptr
lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp