[llvm] Fix crash due to un-checked error in LVReaderHandler::handleArchive method (PR #118951)

Carlos Alberto Enciso via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 13 05:22:41 PST 2024


================
@@ -193,6 +196,72 @@ void checkElementPropertiesMsvcCodeview(LVReader *Reader) {
   EXPECT_EQ(Lines->size(), 0x0eu);
 }
 
+// Check the logical elements basic properties (MSVC library - Codeview).
+void checkElementPropertiesMsvcLibraryCodeview(LVReader *Reader) {
+  LVScopeRoot *Root = Reader->getScopesRoot();
+  LVScopeCompileUnit *CompileUnit =
+      static_cast<LVScopeCompileUnit *>(getFirstScopeChild(Root));
+  LVScopeFunction *Function =
----------------
CarlosAlbertoEnciso wrote:

Same check here for `CompileUnit` and `Function`.

https://github.com/llvm/llvm-project/pull/118951


More information about the llvm-commits mailing list