[llvm] 7cfc1af - [RISCV] Fix -Wdeprecated-declarations in RISCVInstrInfo.cpp (NFC)
Jie Fu via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 24 21:01:40 PDT 2023
Author: Jie Fu
Date: 2023-04-25T11:54:16+08:00
New Revision: 7cfc1af1556943773c02f765bff374304609fd07
URL: https://github.com/llvm/llvm-project/commit/7cfc1af1556943773c02f765bff374304609fd07
DIFF: https://github.com/llvm/llvm-project/commit/7cfc1af1556943773c02f765bff374304609fd07.diff
LOG: [RISCV] Fix -Wdeprecated-declarations in RISCVInstrInfo.cpp (NFC)
/Users/jiefu/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp:2636:10: error: 'makeArrayRef<std::pair<llvm::MachineMemOperand::Flags, const char *>, 2UL>' is deprecated: Use deduction guide instead [-Werror,-Wdeprecated-declarations]
return makeArrayRef(TargetFlags);
^~~~~~~~~~~~
ArrayRef
/Users/jiefu/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:572:3: note: 'makeArrayRef<std::pair<llvm::MachineMemOperand::Flags, const char *>, 2UL>' has been explicitly marked deprecated here
LLVM_DEPRECATED("Use deduction guide instead", "ArrayRef")
^
/Users/jiefu/llvm-project/llvm/include/llvm/Support/Compiler.h:143:50: note: expanded from macro 'LLVM_DEPRECATED'
^
1 error generated.
Added:
Modified:
llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp b/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
index 4a8c5966d4b0..f3c7385965c8 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
@@ -2633,7 +2633,7 @@ RISCVInstrInfo::getSerializableMachineMemOperandTargetFlags() const {
static const std::pair<MachineMemOperand::Flags, const char *> TargetFlags[] =
{{MONontemporalBit0, "riscv-nontemporal-domain-bit-0"},
{MONontemporalBit1, "riscv-nontemporal-domain-bit-1"}};
- return makeArrayRef(TargetFlags);
+ return ArrayRef<std::pair<MachineMemOperand::Flags, const char *>>(TargetFlags);
}
// Returns true if this is the sext.w pattern, addiw rd, rs1, 0.
More information about the llvm-commits
mailing list