Skip to content

Commit 52a3981

Browse files
committed
Fix formatting problems.
1 parent 683dc4d commit 52a3981

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

llvm/include/llvm/MC/MCDisassembler/MCDisassembler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ class MCDisassembler {
224224
// having to pass it around as an argument through all the autogenerated code.
225225
mutable raw_ostream *CommentStream = nullptr;
226226

227-
const std::string& getErrorOrWarningMsg() const { return ErrorOrWarningMsg; }
227+
const std::string &getErrorOrWarningMsg() const { return ErrorOrWarningMsg; }
228228
void setErrorOrWarningMsg(const std::string &Msg) { ErrorOrWarningMsg = Msg; }
229229
};
230230

llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,8 @@ DecodeStatus AMDGPUDisassembler::getInstruction(MCInst &MI, uint64_t &Size,
807807
MCII->get(MI.getOpcode()).hasImplicitDefOfPhysReg(AMDGPU::EXEC)) {
808808
auto ExecEncoding = MRI.getEncodingValue(AMDGPU::EXEC_LO);
809809
if (Bytes_[0] != ExecEncoding) {
810-
const_cast<AMDGPUDisassembler*>(this)->setErrorOrWarningMsg("invalid vdst encoding");
810+
const_cast<AMDGPUDisassembler *>(this)->setErrorOrWarningMsg(
811+
"invalid vdst encoding");
811812
Status = MCDisassembler::SoftFail;
812813
}
813814
}

llvm/tools/llvm-mc/Disassembler.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ static bool PrintInsts(const MCDisassembler &DisAsm, const ByteArrayTy &Bytes,
4545
MCInst Inst;
4646

4747
MCDisassembler::DecodeStatus S;
48-
const_cast<MCDisassembler&>(DisAsm).setErrorOrWarningMsg("");
48+
const_cast<MCDisassembler &>(DisAsm).setErrorOrWarningMsg("");
4949
S = DisAsm.getInstruction(Inst, Size, Data.slice(Index), Index, nulls());
5050
switch (S) {
5151
case MCDisassembler::Fail:
@@ -64,7 +64,9 @@ static bool PrintInsts(const MCDisassembler &DisAsm, const ByteArrayTy &Bytes,
6464
case MCDisassembler::SoftFail:
6565
SM.PrintMessage(SMLoc::getFromPointer(Bytes.second[Index]),
6666
SourceMgr::DK_Warning,
67-
DisAsm.getErrorOrWarningMsg().empty() ? "potentially undefined instruction encoding" : DisAsm.getErrorOrWarningMsg());
67+
DisAsm.getErrorOrWarningMsg().empty()
68+
? "potentially undefined instruction encoding"
69+
: DisAsm.getErrorOrWarningMsg());
6870
[[fallthrough]];
6971

7072
case MCDisassembler::Success:

0 commit comments

Comments
 (0)