[llvm] 2dd50bf - [OpenMP] Fix warnings
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 16 08:54:10 PDT 2025
Author: Kazu Hirata
Date: 2025-06-16T08:54:04-07:00
New Revision: 2dd50bf79edefa28beffdbba4edfc2c753adae61
URL: https://github.com/llvm/llvm-project/commit/2dd50bf79edefa28beffdbba4edfc2c753adae61
DIFF: https://github.com/llvm/llvm-project/commit/2dd50bf79edefa28beffdbba4edfc2c753adae61.diff
LOG: [OpenMP] Fix warnings
This patch fixes:
llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:7233:9: error: unused
variable 'TaskTy' [-Werror,-Wunused-variable]
llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:7666:15: error: unused
variable 'ArrayType' [-Werror,-Wunused-variable]
Added:
Modified:
llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
index c1f02b2b240de..828205776f3fe 100644
--- a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+++ b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
@@ -7257,6 +7257,7 @@ static Function *emitTargetTaskProxyFunction(
assert(TaskTy != TaskWithPrivatesTy &&
"If there are offloading arrays to pass to the target"
"TaskTy cannot be the same as TaskWithPrivatesTy");
+ (void)TaskTy;
Value *Privates =
Builder.CreateStructGEP(TaskWithPrivatesTy, TaskWithPrivates, 1);
for (unsigned int i = 0; i < NumOffloadingArrays; ++i)
@@ -7669,6 +7670,7 @@ OpenMPIRBuilder::InsertPointOrErrorTy OpenMPIRBuilder::emitTargetTask(
Type *ElementType = PrivatesTy->getElementType(i);
assert(ElementType == ArrayType &&
"ElementType should match ArrayType");
+ (void)ArrayType;
Value *Dst = Builder.CreateStructGEP(PrivatesTy, Privates, i);
Builder.CreateMemCpy(
More information about the llvm-commits
mailing list