[DebugInfo] Don't dereference a dyn_cast<PDBSymbolData> result. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 15 Sep 2019 15:38:26 +0000 (15:38 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 15 Sep 2019 15:38:26 +0000 (15:38 +0000)
commit4f234aaf2c9801364d1855dc82466c4a307360cb
treee2e5fda4949c10e9177ebeb80fa1dce6cbd445f0
parentb325c057322ce14b5c561d8ac49508adab7649e5
[DebugInfo] Don't dereference a dyn_cast<PDBSymbolData> result. NFCI.

The static analyzer is warning about a potential null dereference - but as we're in DataMemberLayoutItem we should be able to guarantee that the Symbol is a PDBSymbolData type, allowing us to use cast<PDBSymbolData> - and if not assert will fire for us.

llvm-svn: 371933
llvm/lib/DebugInfo/PDB/UDTLayout.cpp