Skip to content

Commit 7e4165c

Browse files
committed
[BOLT] Fix more review nits (llvm#120064)
1 parent fee7474 commit 7e4165c

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

bolt/include/bolt/Core/MCPlus.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,13 @@ class MCAnnotation {
7272
kLabel, /// MCSymbol pointing to this instruction.
7373
kSize, /// Size of the instruction.
7474
kDynamicBranch, /// Jit instruction patched at runtime.
75-
kSigning, /// Inst is a signing instruction (paciasp, etc.)
76-
kSigned, /// Inst is in a range where RA is signed
77-
kAuthenticating, /// Authenticating inst (e.g. autiasp)
78-
kUnsigned, /// Inst is in a range where RA is unsigned
79-
kRememberState, /// Inst has rememberState CFI
80-
kRestoreState, /// Inst has restoreState CFI
81-
kNegateState, /// Inst has OpNegateRAState CFI
75+
kSigning, /// Inst is a signing instruction (paciasp, etc.).
76+
kSigned, /// Inst is in a range where RA is signed.
77+
kAuthenticating, /// Authenticating inst (e.g. autiasp).
78+
kUnsigned, /// Inst is in a range where RA is unsigned.
79+
kRememberState, /// Inst has rememberState CFI.
80+
kRestoreState, /// Inst has restoreState CFI.
81+
kNegateState, /// Inst has OpNegateRAState CFI.
8282
kGeneric, /// First generic annotation.
8383
};
8484

bolt/lib/Core/MCPlusBuilder.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,8 @@ bool MCPlusBuilder::isRAUnsigned(const MCInst &Inst) const {
211211
}
212212

213213
bool MCPlusBuilder::isRAStateUnknown(const MCInst &Inst) const {
214-
if (isRAUnsigned(Inst) || isRASigned(Inst) || isRASigning(Inst) ||
215-
isAuthenticating(Inst))
216-
return false;
217-
return true;
214+
return !(isRAUnsigned(Inst) || isRASigned(Inst) || isRASigning(Inst) ||
215+
isAuthenticating(Inst));
218216
}
219217

220218
std::optional<MCLandingPad> MCPlusBuilder::getEHInfo(const MCInst &Inst) const {

bolt/lib/Passes/MarkRAStates.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ void MarkRAStates::runOnFunction(BinaryFunction &BF) {
7474
if (BC.MIB->isPSign(Inst)) {
7575
assert(!RAState && "Signed RA State before PSign");
7676
BC.MIB->setRASigning(Inst);
77-
7877
} else if (BC.MIB->isPAuth(Inst)) {
7978
assert(RAState && "Unsigned RA State before PAuth");
8079
BC.MIB->setAuthenticating(Inst);

0 commit comments

Comments
 (0)