[tablegen] Merge duplicate definitions of getMinimalTypeForRange. NFC.
Summary: Depends on D25614
Reviewers: qcolombet
Subscribers: qcolombet, beanz, mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D25617
llvm-svn: 287438
diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
index dbb947a..25172ca 100644
--- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp
+++ b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
@@ -98,6 +98,7 @@
#include "CodeGenTarget.h"
#include "SubtargetFeatureInfo.h"
+#include "Types.h"
#include "llvm/ADT/CachedHashString.h"
#include "llvm/ADT/PointerUnion.h"
#include "llvm/ADT/STLExtras.h"
@@ -2363,17 +2364,6 @@
OS << "}\n\n";
}
-static const char *getMinimalTypeForRange(uint64_t Range) {
- assert(Range <= 0xFFFFFFFFFFFFFFFFULL && "Enum too large");
- if (Range > 0xFFFFFFFFULL)
- return "uint64_t";
- if (Range > 0xFFFF)
- return "uint32_t";
- if (Range > 0xFF)
- return "uint16_t";
- return "uint8_t";
-}
-
static const char *getMinimalRequiredFeaturesType(const AsmMatcherInfo &Info) {
uint64_t MaxIndex = Info.SubtargetFeatures.size();
if (MaxIndex > 0)