[llvm] ea97066 - Fix signed/unsigned comparison after b5426ced71280

Jeremy Morse via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 18 02:29:24 PDT 2021


Author: Jeremy Morse
Date: 2021-10-18T10:28:52+01:00
New Revision: ea970661dc74505da6c45f6c83579aabb115ecc5

URL: https://github.com/llvm/llvm-project/commit/ea970661dc74505da6c45f6c83579aabb115ecc5
DIFF: https://github.com/llvm/llvm-project/commit/ea970661dc74505da6c45f6c83579aabb115ecc5.diff

LOG: Fix signed/unsigned comparison after b5426ced71280

gcc11 warns that this counter causes a signed/unsigned comaprison when it's
later compared with a SmallVector::difference_type. gcc appears to be
correct, clang does not warn one way or the other.

Added: 
    

Modified: 
    llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
index 32937666ea7a5..1dde668c991aa 100644
--- a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
+++ b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
@@ -2175,7 +2175,7 @@ bool InstrRefBasedLDV::vlocJoin(
     // live-out values.
     SmallVector<InValueT, 8> Values;
     bool Bail = false;
-    unsigned BackEdgesStart = 0;
+    int BackEdgesStart = 0;
     for (auto p : BlockOrders) {
       // If the predecessor isn't in scope / to be explored, we'll never be
       // able to join any locations.


        


More information about the llvm-commits mailing list