Skip to content

Commit

Permalink
[TableGen] Add const to SubtargetFeatures reference in emitSubtargetF…
Browse files Browse the repository at this point in the history
…eatureBitEnumeration. NFC

emitSubtargetFeatureBitEnumeration doesn't modify the map so we should
use const reference.
  • Loading branch information
topperc committed Aug 23, 2023
1 parent d40e600 commit dc6e68a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion llvm/utils/TableGen/SubtargetFeatureInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ SubtargetFeatureInfo::getAll(const RecordKeeper &Records) {
}

void SubtargetFeatureInfo::emitSubtargetFeatureBitEnumeration(
SubtargetFeatureInfoMap &SubtargetFeatures, raw_ostream &OS) {
const SubtargetFeatureInfoMap &SubtargetFeatures, raw_ostream &OS) {
OS << "// Bits for subtarget features that participate in "
<< "instruction matching.\n";
OS << "enum SubtargetFeatureBits : "
Expand Down
5 changes: 2 additions & 3 deletions llvm/utils/TableGen/SubtargetFeatureInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ struct SubtargetFeatureInfo {
///
/// This version emits the bit index for the feature and can therefore support
/// more than 64 feature bits.
static void
emitSubtargetFeatureBitEnumeration(SubtargetFeatureInfoMap &SubtargetFeatures,
raw_ostream &OS);
static void emitSubtargetFeatureBitEnumeration(
const SubtargetFeatureInfoMap &SubtargetFeatures, raw_ostream &OS);

static void emitNameTable(SubtargetFeatureInfoMap &SubtargetFeatures,
raw_ostream &OS);
Expand Down

0 comments on commit dc6e68a

Please sign in to comment.