[clang] 6ef4450 - [clang] Fix -Wunused-function in CGStmtOpenMP.cpp (NFC)
Jie Fu via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 10 16:38:42 PDT 2024
Author: Jie Fu
Date: 2024-04-11T07:37:12+08:00
New Revision: 6ef4450705473e5cccb025219e8980999f456b71
URL: https://github.com/llvm/llvm-project/commit/6ef4450705473e5cccb025219e8980999f456b71
DIFF: https://github.com/llvm/llvm-project/commit/6ef4450705473e5cccb025219e8980999f456b71.diff
LOG: [clang] Fix -Wunused-function in CGStmtOpenMP.cpp (NFC)
llvm-project/clang/lib/CodeGen/CGStmtOpenMP.cpp:7959:13:
error: unused function 'emitTargetTeamsLoopCodegenStatus' [-Werror,-Wunused-function]
static void emitTargetTeamsLoopCodegenStatus(CodeGenFunction &CGF,
^
1 error generated.
Added:
Modified:
clang/lib/CodeGen/CGStmtOpenMP.cpp
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp
index 3bf99366b69ced..a0a8a07c76ba16 100644
--- a/clang/lib/CodeGen/CGStmtOpenMP.cpp
+++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp
@@ -7956,10 +7956,10 @@ void CodeGenFunction::EmitOMPTeamsGenericLoopDirective(
[](CodeGenFunction &) { return nullptr; });
}
+#ifndef NDEBUG
static void emitTargetTeamsLoopCodegenStatus(CodeGenFunction &CGF,
std::string StatusMsg,
const OMPExecutableDirective &D) {
-#ifndef NDEBUG
bool IsDevice = CGF.CGM.getLangOpts().OpenMPIsTargetDevice;
if (IsDevice)
StatusMsg += ": DEVICE";
@@ -7972,8 +7972,8 @@ static void emitTargetTeamsLoopCodegenStatus(CodeGenFunction &CGF,
unsigned LineNo =
PLoc.isValid() ? PLoc.getLine() : SM.getExpansionLineNumber(L);
llvm::dbgs() << StatusMsg << ": " << FileName << ": " << LineNo << "\n";
-#endif
}
+#endif
static void emitTargetTeamsGenericLoopRegionAsParallel(
CodeGenFunction &CGF, PrePostActionTy &Action,
More information about the cfe-commits
mailing list