diff --git a/bolt/lib/Core/CallGraph.cpp b/bolt/lib/Core/CallGraph.cpp index f1d52737bf556..f07add3a88112 100644 --- a/bolt/lib/Core/CallGraph.cpp +++ b/bolt/lib/Core/CallGraph.cpp @@ -22,7 +22,7 @@ #undef USE_SSECRC #endif -static LLVM_ATTRIBUTE_UNUSED inline size_t hash_int64_fallback(int64_t k) { +[[maybe_unused]] static inline size_t hash_int64_fallback(int64_t k) { uint64_t key = (unsigned long long)k; // "64 bit Mix Functions", from Thomas Wang's "Integer Hash Function." // http://www.concentric.net/~ttwang/tech/inthash.htm @@ -35,7 +35,7 @@ static LLVM_ATTRIBUTE_UNUSED inline size_t hash_int64_fallback(int64_t k) { return static_cast(static_cast(key)); } -static LLVM_ATTRIBUTE_UNUSED inline size_t hash_int64(int64_t k) { +[[maybe_unused]] static inline size_t hash_int64(int64_t k) { #if defined(USE_SSECRC) && defined(__SSE4_2__) size_t h = 0; __asm("crc32q %1, %0\n" : "+r"(h) : "rm"(k)); diff --git a/bolt/lib/Core/DebugData.cpp b/bolt/lib/Core/DebugData.cpp index 24a4c852e9d7e..2687788167a8a 100644 --- a/bolt/lib/Core/DebugData.cpp +++ b/bolt/lib/Core/DebugData.cpp @@ -101,7 +101,7 @@ std::optional findAttributeInfo(const DWARFDie DIE, return findAttributeInfo(DIE, AbbrevDecl, *Index); } -LLVM_ATTRIBUTE_UNUSED +[[maybe_unused]] static void printLE64(const std::string &S) { for (uint32_t I = 0, Size = S.size(); I < Size; ++I) { errs() << Twine::utohexstr(S[I]); diff --git a/bolt/lib/Rewrite/DWARFRewriter.cpp b/bolt/lib/Rewrite/DWARFRewriter.cpp index a7a4b664693fc..5e3fa931e826f 100644 --- a/bolt/lib/Rewrite/DWARFRewriter.cpp +++ b/bolt/lib/Rewrite/DWARFRewriter.cpp @@ -69,7 +69,7 @@ static void printDie(const DWARFDie &DIE) { } /// Lazily parse DWARF DIE and print it out. -LLVM_ATTRIBUTE_UNUSED +[[maybe_unused]] static void printDie(DWARFUnit &DU, uint64_t DIEOffset) { uint64_t OriginalOffsets = DIEOffset; uint64_t NextCUOffset = DU.getNextUnitOffset();