Skip to content

Commit 926d142

Browse files
committed
[LoongArch] Remove unneeded MCAsmLayout
1 parent e8e05c3 commit 926d142

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchAsmBackend.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,6 @@ bool LoongArchAsmBackend::relaxDwarfCFA(const MCAssembler &Asm,
386386
SmallVectorImpl<MCFixup> &Fixups = DF.getFixups();
387387
size_t OldSize = Data.size();
388388

389-
auto &Layout = *Asm.getLayout();
390389
int64_t Value;
391390
if (AddrDelta.evaluateAsAbsolute(Value, Asm))
392391
return false;
@@ -398,11 +397,8 @@ bool LoongArchAsmBackend::relaxDwarfCFA(const MCAssembler &Asm,
398397
Fixups.clear();
399398
raw_svector_ostream OS(Data);
400399

401-
assert(
402-
Layout.getAssembler().getContext().getAsmInfo()->getMinInstAlignment() ==
403-
1 &&
404-
"expected 1-byte alignment");
405-
(void)Layout;
400+
assert(Asm.getContext().getAsmInfo()->getMinInstAlignment() == 1 &&
401+
"expected 1-byte alignment");
406402
if (Value == 0) {
407403
WasRelaxed = OldSize != Data.size();
408404
return true;

0 commit comments

Comments
 (0)