[llvm] r358814 - [llvm-symbolizer] Fix section index at the end of a section

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 20 06:00:10 PDT 2019


Author: maskray
Date: Sat Apr 20 06:00:09 2019
New Revision: 358814

URL: http://llvm.org/viewvc/llvm-project?rev=358814&view=rev
Log:
[llvm-symbolizer] Fix section index at the end of a section

This is very minor issue. The returned section index is only used by
DWARFDebugLine as an llvm::upper_bound input and the use case shouldn't
cause any behavioral change.

Modified:
    llvm/trunk/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp

Modified: llvm/trunk/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp?rev=358814&r1=358813&r2=358814&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp (original)
+++ llvm/trunk/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp Sat Apr 20 06:00:09 2019
@@ -313,9 +313,8 @@ uint64_t SymbolizableObjectFile::getModu
       continue;
 
     if (Address >= Sec.getAddress() &&
-        Address <= Sec.getAddress() + Sec.getSize()) {
+        Address < Sec.getAddress() + Sec.getSize())
       return Sec.getIndex();
-    }
   }
 
   return object::SectionedAddress::UndefSection;




More information about the llvm-commits mailing list