[llvm] e9c5d80 - [RISCV] Use 'unsigned' for XLen in RISCVTargetDefEmitter.cpp. NFC

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 18 01:01:43 PDT 2023


Author: Craig Topper
Date: 2023-03-18T01:00:48-07:00
New Revision: e9c5d8007efcda694b8a21f65d409efa78427724

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

LOG: [RISCV] Use 'unsigned' for XLen in RISCVTargetDefEmitter.cpp. NFC

The values are small so the difference doesn't matter, but the
consuming function is defined to take 'unsigned'.

Added: 
    

Modified: 
    llvm/utils/TableGen/RISCVTargetDefEmitter.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/utils/TableGen/RISCVTargetDefEmitter.cpp b/llvm/utils/TableGen/RISCVTargetDefEmitter.cpp
index fa6508cbfc696..b534ce4b3b785 100644
--- a/llvm/utils/TableGen/RISCVTargetDefEmitter.cpp
+++ b/llvm/utils/TableGen/RISCVTargetDefEmitter.cpp
@@ -27,7 +27,7 @@ using ISAInfoTy = llvm::Expected<std::unique_ptr<RISCVISAInfo>>;
 // get feature name from feature records instead of feature bits.
 static std::string getMArch(const Record &Rec) {
   std::vector<std::string> FeatureVector;
-  int XLen = 32;
+  unsigned XLen = 32;
 
   // Convert features to FeatureVector.
   for (auto *Feature : Rec.getValueAsListOfDefs("Features")) {


        


More information about the llvm-commits mailing list