[llvm] 99ac9ce - [NFC] Clean up in MCObjectStreamer and X86AsmBackend
Shengchen Kan via llvm-commits
llvm-commits at lists.llvm.org
Fri May 8 21:51:45 PDT 2020
Author: Shengchen Kan
Date: 2020-05-09T12:50:44+08:00
New Revision: 99ac9ce7016d701b43b8f0c308dc3463da57d983
URL: https://github.com/llvm/llvm-project/commit/99ac9ce7016d701b43b8f0c308dc3463da57d983
DIFF: https://github.com/llvm/llvm-project/commit/99ac9ce7016d701b43b8f0c308dc3463da57d983.diff
LOG: [NFC] Clean up in MCObjectStreamer and X86AsmBackend
Added:
Modified:
llvm/lib/MC/MCObjectStreamer.cpp
llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
Removed:
################################################################################
diff --git a/llvm/lib/MC/MCObjectStreamer.cpp b/llvm/lib/MC/MCObjectStreamer.cpp
index fd4422fc368c..9c564c83b6b5 100644
--- a/llvm/lib/MC/MCObjectStreamer.cpp
+++ b/llvm/lib/MC/MCObjectStreamer.cpp
@@ -187,7 +187,7 @@ MCFragment *MCObjectStreamer::getCurrentFragment() const {
return nullptr;
}
-static bool CanReuseDataFragment(const MCDataFragment &F,
+static bool canReuseDataFragment(const MCDataFragment &F,
const MCAssembler &Assembler,
const MCSubtargetInfo *STI) {
if (!F.hasInstructions())
@@ -204,7 +204,7 @@ static bool CanReuseDataFragment(const MCDataFragment &F,
MCDataFragment *
MCObjectStreamer::getOrCreateDataFragment(const MCSubtargetInfo *STI) {
MCDataFragment *F = dyn_cast_or_null<MCDataFragment>(getCurrentFragment());
- if (!F || !CanReuseDataFragment(*F, *Assembler, STI)) {
+ if (!F || !canReuseDataFragment(*F, *Assembler, STI)) {
F = new MCDataFragment();
insert(F);
}
@@ -403,8 +403,8 @@ void MCObjectStreamer::emitInstructionImpl(const MCInst &Inst,
if (Assembler.getRelaxAll() ||
(Assembler.isBundlingEnabled() && Sec->isBundleLocked())) {
MCInst Relaxed = Inst;
- while (getAssembler().getBackend().mayNeedRelaxation(Relaxed, STI))
- getAssembler().getBackend().relaxInstruction(Relaxed, STI);
+ while (Backend.mayNeedRelaxation(Relaxed, STI))
+ Backend.relaxInstruction(Relaxed, STI);
emitInstToData(Relaxed, STI);
return;
}
diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp b/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
index 7af299983958..3e0761fb85b1 100644
--- a/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
+++ b/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
@@ -64,7 +64,7 @@ class X86AlignBranchKind {
else {
errs() << "invalid argument " << BranchType.str()
<< " to -x86-align-branch=; each element must be one of: fused, "
- "jcc, jmp, call, ret, indirect.(plus separated)";
+ "jcc, jmp, call, ret, indirect.(plus separated)\n";
}
}
}
More information about the llvm-commits
mailing list