[llvm] [NFC][TableGen] Refactor SequenceToOffsetTable class. (PR #104986)

Jakub Kuderski via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 22 16:10:03 PDT 2024


================
@@ -15,20 +15,20 @@
 #ifndef LLVM_UTILS_TABLEGEN_BASIC_SEQUENCETOOFFSETTABLE_H
 #define LLVM_UTILS_TABLEGEN_BASIC_SEQUENCETOOFFSETTABLE_H
 
+#include "llvm/ADT/StringExtras.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/raw_ostream.h"
 #include <algorithm>
 #include <cassert>
-#include <cctype>
 #include <functional>
 #include <map>
 
 namespace llvm {
-extern llvm::cl::opt<bool> EmitLongStrLiterals;
+extern cl::opt<bool> EmitLongStrLiterals;
 
-static inline void printChar(raw_ostream &OS, char C) {
+inline void printChar(raw_ostream &OS, char C) {
   unsigned char UC(C);
-  if (isalnum(UC) || ispunct(UC)) {
+  if (isAlnum(UC) || isPunct(UC)) {
----------------
kuhar wrote:

This is not strictly an NFC depending on the locale, right?

https://github.com/llvm/llvm-project/pull/104986


More information about the llvm-commits mailing list