[llvm] 926d142 - [LoongArch] Remove unneeded MCAsmLayout
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 1 17:43:23 PDT 2024
Author: Fangrui Song
Date: 2024-07-01T17:43:18-07:00
New Revision: 926d142ece6a99da3f6d3438e9b2ab8ca31ac3a9
URL: https://github.com/llvm/llvm-project/commit/926d142ece6a99da3f6d3438e9b2ab8ca31ac3a9
DIFF: https://github.com/llvm/llvm-project/commit/926d142ece6a99da3f6d3438e9b2ab8ca31ac3a9.diff
LOG: [LoongArch] Remove unneeded MCAsmLayout
Added:
Modified:
llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchAsmBackend.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchAsmBackend.cpp b/llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchAsmBackend.cpp
index a4ba831b64b8c..9235ade95131b 100644
--- a/llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchAsmBackend.cpp
+++ b/llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchAsmBackend.cpp
@@ -386,7 +386,6 @@ bool LoongArchAsmBackend::relaxDwarfCFA(const MCAssembler &Asm,
SmallVectorImpl<MCFixup> &Fixups = DF.getFixups();
size_t OldSize = Data.size();
- auto &Layout = *Asm.getLayout();
int64_t Value;
if (AddrDelta.evaluateAsAbsolute(Value, Asm))
return false;
@@ -398,11 +397,8 @@ bool LoongArchAsmBackend::relaxDwarfCFA(const MCAssembler &Asm,
Fixups.clear();
raw_svector_ostream OS(Data);
- assert(
- Layout.getAssembler().getContext().getAsmInfo()->getMinInstAlignment() ==
- 1 &&
- "expected 1-byte alignment");
- (void)Layout;
+ assert(Asm.getContext().getAsmInfo()->getMinInstAlignment() == 1 &&
+ "expected 1-byte alignment");
if (Value == 0) {
WasRelaxed = OldSize != Data.size();
return true;
More information about the llvm-commits
mailing list