aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2024-07-01 17:43:17 -0700
committerFangrui Song <i@maskray.me>2024-07-01 17:43:18 -0700
commit926d142ece6a99da3f6d3438e9b2ab8ca31ac3a9 (patch)
treedac2f42ed96f34ee249953c109df1c91dda8b32a
parente8e05c3192af5c4a71cd2af03c1425158fc647cd (diff)
downloadllvm-926d142ece6a99da3f6d3438e9b2ab8ca31ac3a9.zip
llvm-926d142ece6a99da3f6d3438e9b2ab8ca31ac3a9.tar.gz
llvm-926d142ece6a99da3f6d3438e9b2ab8ca31ac3a9.tar.bz2
[LoongArch] Remove unneeded MCAsmLayout
-rw-r--r--llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchAsmBackend.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchAsmBackend.cpp b/llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchAsmBackend.cpp
index a4ba831..9235ade 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;