Skip to content

Commit 0812cde

Browse files
NFC: Make isPPC64 const and use member initializer
1 parent df78e6b commit 0812cde

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ namespace {
9797
struct PPCOperand;
9898

9999
class PPCAsmParser : public MCTargetAsmParser {
100-
bool IsPPC64;
100+
const bool IsPPC64;
101101

102102
void Warning(SMLoc L, const Twine &Msg) { getParser().Warning(L, Msg); }
103103

@@ -142,10 +142,8 @@ class PPCAsmParser : public MCTargetAsmParser {
142142
public:
143143
PPCAsmParser(const MCSubtargetInfo &STI, MCAsmParser &,
144144
const MCInstrInfo &MII, const MCTargetOptions &Options)
145-
: MCTargetAsmParser(Options, STI, MII) {
146-
// Check for 64-bit vs. 32-bit pointer mode.
147-
const Triple &TheTriple = STI.getTargetTriple();
148-
IsPPC64 = TheTriple.isPPC64();
145+
: MCTargetAsmParser(Options, STI, MII),
146+
IsPPC64(STI.getTargetTriple().isPPC64()) {
149147
// Initialize the set of available features.
150148
setAvailableFeatures(ComputeAvailableFeatures(STI.getFeatureBits()));
151149
}

0 commit comments

Comments
 (0)