[llvm] 5571687 - [LoongArch] Fix a warning
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 1 17:23:51 PDT 2024
Author: Kazu Hirata
Date: 2024-07-01T17:23:45-07:00
New Revision: 557168767607dbf640b57bbfb97d870e6de07d4e
URL: https://github.com/llvm/llvm-project/commit/557168767607dbf640b57bbfb97d870e6de07d4e
DIFF: https://github.com/llvm/llvm-project/commit/557168767607dbf640b57bbfb97d870e6de07d4e.diff
LOG: [LoongArch] Fix a warning
This patch fixes:
llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchAsmBackend.cpp:389:9:
error: unused variable 'Layout' [-Werror,-Wunused-variable]
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 0d65bde11c6d6..a4ba831b64b8c 100644
--- a/llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchAsmBackend.cpp
+++ b/llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchAsmBackend.cpp
@@ -402,6 +402,7 @@ bool LoongArchAsmBackend::relaxDwarfCFA(const MCAssembler &Asm,
Layout.getAssembler().getContext().getAsmInfo()->getMinInstAlignment() ==
1 &&
"expected 1-byte alignment");
+ (void)Layout;
if (Value == 0) {
WasRelaxed = OldSize != Data.size();
return true;
More information about the llvm-commits
mailing list