[PATCH] D70195: Fix error message missed in commit dde589389fcb8b5098f7a47f1b781b27d29a0cac.
    Andrew via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Nov 13 11:28:01 PST 2019
    
    
  
browneee created this revision.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
browneee added reviewers: tejohnson, evgeny777.
Repository:
  rG LLVM Github Monorepo
https://reviews.llvm.org/D70195
Files:
  llvm/lib/Bitcode/Reader/BitcodeReader.cpp
Index: llvm/lib/Bitcode/Reader/BitcodeReader.cpp
===================================================================
--- llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -5778,9 +5778,11 @@
   }
   const uint64_t Version = Record[0];
   const bool IsOldProfileFormat = Version == 1;
-  if (Version < 1 || Version > 8)
+  const uint64_t INDEX_VERSION = 8;
+  if (Version < 1 || Version > INDEX_VERSION)
     return error("Invalid summary version " + Twine(Version) +
-                 ". Version should be in the range [1-7].");
+                 ". Version should be in the range [1-" + Twine(INDEX_VERSION) +
+                 "].");
   Record.clear();
 
   // Keep around the last seen summary to be used when we see an optional
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70195.229143.patch
Type: text/x-patch
Size: 773 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191113/471617be/attachment.bin>
    
    
More information about the llvm-commits
mailing list