Skip to content

Commit 96cf206

Browse files
[llvm] Replace LLVM_ATTRIBUTE_UNUSED with [[maybe_unused]] (NFC) (#163702)
This patch replaces LLVM_ATTRIBUTE_UNUSED with [[maybe_unused]], introduced as part of C++17.
1 parent ffca377 commit 96cf206

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

llvm/lib/Support/Windows/Signals.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,8 @@ namespace llvm {
354354
/// Emulates hitting "retry" from an "abort, retry, ignore" CRT debug report
355355
/// dialog. "retry" raises an exception which ultimately triggers our stack
356356
/// dumper.
357-
static LLVM_ATTRIBUTE_UNUSED int
358-
AvoidMessageBoxHook(int ReportType, char *Message, int *Return) {
357+
[[maybe_unused]] static int AvoidMessageBoxHook(int ReportType, char *Message,
358+
int *Return) {
359359
// Set *Return to the retry code for the return value of _CrtDbgReport:
360360
// http://msdn.microsoft.com/en-us/library/8hyw4sy7(v=vs.71).aspx
361361
// This may also trigger just-in-time debugging via DebugBreak().

llvm/lib/Target/Mips/MipsFastISel.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,10 @@ class MipsFastISel final : public FastISel {
264264

265265
} // end anonymous namespace
266266

267-
static bool CC_Mips(unsigned ValNo, MVT ValVT, MVT LocVT,
268-
CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags,
269-
Type *OrigTy, CCState &State) LLVM_ATTRIBUTE_UNUSED;
267+
[[maybe_unused]] static bool CC_Mips(unsigned ValNo, MVT ValVT, MVT LocVT,
268+
CCValAssign::LocInfo LocInfo,
269+
ISD::ArgFlagsTy ArgFlags, Type *OrigTy,
270+
CCState &State);
270271

271272
static bool CC_MipsO32_FP32(unsigned ValNo, MVT ValVT, MVT LocVT,
272273
CCValAssign::LocInfo LocInfo,

llvm/lib/Target/Mips/MipsISelLowering.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3176,9 +3176,10 @@ static bool CC_MipsO32_FP64(unsigned ValNo, MVT ValVT, MVT LocVT,
31763176
F64Regs);
31773177
}
31783178

3179-
static bool CC_MipsO32(unsigned ValNo, MVT ValVT, MVT LocVT,
3180-
CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags,
3181-
Type *OrigTy, CCState &State) LLVM_ATTRIBUTE_UNUSED;
3179+
[[maybe_unused]] static bool CC_MipsO32(unsigned ValNo, MVT ValVT, MVT LocVT,
3180+
CCValAssign::LocInfo LocInfo,
3181+
ISD::ArgFlagsTy ArgFlags, Type *OrigTy,
3182+
CCState &State);
31823183

31833184
#include "MipsGenCallingConv.inc"
31843185

0 commit comments

Comments
 (0)