[llvm] 34f3249 - [DebugInfo] Fix error from D95893, where I accidentally used an

Amy Huang via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 5 10:25:55 PST 2021


Author: Amy Huang
Date: 2021-02-05T10:25:21-08:00
New Revision: 34f3249abdff13adf6b18e55f3b4110b6c697bcb

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

LOG: [DebugInfo] Fix error from D95893, where I accidentally used an
unsigned int in a loop and it wraps around.

Follow up to https://reviews.llvm.org/D95893

Added: 
    

Modified: 
    llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
index 08eb206a9bae..a0e699eb8c89 100644
--- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
@@ -365,7 +365,7 @@ static StringRef removeTemplateArgs(StringRef Name) {
     return Name;
 
   int OpenBrackets = 0;
-  for (size_t i = Name.size() - 1; i >= 0; --i) {
+  for (int i = Name.size() - 1; i >= 0; --i) {
     if (Name[i] == '>')
       ++OpenBrackets;
     else if (Name[i] == '<') {


        


More information about the llvm-commits mailing list