@@ -221,12 +221,10 @@ constexpr ::llvm::StringRef strip_quotes(const char *Str) {
221221#define LDBG_GET_DEBUG_TYPE_STR () LDBG_GET_DEBUG_TYPE_STR_(DEBUG_TYPE)
222222
223223// / Helper to call isCurrentDebugType with a StringRef.
224- static LLVM_ATTRIBUTE_UNUSED bool ldbgIsCurrentDebugType (StringRef Type,
225- int Level) {
224+ [[maybe_unused]] static bool ldbgIsCurrentDebugType (StringRef Type, int Level) {
226225 return ::llvm::isCurrentDebugType (Type.str ().c_str (), Level);
227226}
228- static LLVM_ATTRIBUTE_UNUSED bool ldbgIsCurrentDebugType (int Level,
229- StringRef Type) {
227+ [[maybe_unused]] static bool ldbgIsCurrentDebugType (int Level, StringRef Type) {
230228 return ::llvm::isCurrentDebugType (Type.str ().c_str (), Level);
231229}
232230
@@ -302,7 +300,7 @@ class RAIINewLineStream final : public raw_ostream {
302300};
303301
304302// / Remove the path prefix from the file name.
305- static LLVM_ATTRIBUTE_UNUSED constexpr const char *
303+ [[maybe_unused]] static constexpr const char *
306304getShortFileName (const char *path) {
307305 const char *filename = path;
308306 for (const char *p = path; *p != ' \0 ' ; ++p) {
@@ -315,7 +313,7 @@ getShortFileName(const char *path) {
315313// / Compute the prefix for the debug log in the form of:
316314// / "[DebugType] File:Line "
317315// / Where the File is the file name without the path prefix.
318- static LLVM_ATTRIBUTE_UNUSED std::string
316+ [[maybe_unused]] static std::string
319317computePrefix (StringRef DebugType, const char *File, int Line, int Level) {
320318 std::string Prefix;
321319 raw_string_ostream OsPrefix (Prefix);
@@ -326,7 +324,7 @@ computePrefix(StringRef DebugType, const char *File, int Line, int Level) {
326324 return OsPrefix.str ();
327325}
328326// / Overload allowing to swap the order of the DebugType and Level arguments.
329- static LLVM_ATTRIBUTE_UNUSED std::string
327+ [[maybe_unused]] static std::string
330328computePrefix (int Level, const char *File, int Line, StringRef DebugType) {
331329 return computePrefix (DebugType, File, Line, Level);
332330}
0 commit comments