[PATCH] D33176: ELF: --gdb-index: Change findSection to return an InputSection.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 15 10:24:39 PDT 2017


ruiu added a comment.

How did you create that object file? At least you want to leave a comment in the test about how you created it.



================
Comment at: lld/ELF/SyntheticSections.cpp:1707
   for (InputSectionBase *S : Arr)
-    if (S && S != &InputSection::Discarded && S->Live)
+    if (S && isa<InputSection>(S) && S != &InputSection::Discarded && S->Live)
       if (Offset >= S->getOffsetInFile() &&
----------------
Use dyn_cast instead of isa and cast.


https://reviews.llvm.org/D33176





More information about the llvm-commits mailing list