[llvm] [TableGen] Refactor SequenceToOffsetTable class. (PR #104986)
Rahul Joshi via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 22 19:15:08 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)) {
----------------
jurahul wrote:
I am not familiar with locale related issues, but we have done similar changes recently in other parts (like TGLexer) at the prompting of @MaskRay . @MaskRay can you comment on the safety of this change? This code is used by tablegen emitters which I assume do not need to deal with locale related issues?
https://github.com/llvm/llvm-project/pull/104986
More information about the llvm-commits
mailing list