[llvm] e757a3b - [OpenMP][NFC] Remove unncessary capture in RAII struct
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 26 12:06:11 PDT 2021
Author: Joseph Huber
Date: 2021-07-26T15:05:55-04:00
New Revision: e757a3b05fd99bb5b5e6460c1d59cd0a170a6033
URL: https://github.com/llvm/llvm-project/commit/e757a3b05fd99bb5b5e6460c1d59cd0a170a6033
DIFF: https://github.com/llvm/llvm-project/commit/e757a3b05fd99bb5b5e6460c1d59cd0a170a6033.diff
LOG: [OpenMP][NFC] Remove unncessary capture in RAII struct
Summary:
There was an unnecessary variable assigned to the information cache when we
only need it in the constructor to extract the function declaration.
Added:
Modified:
llvm/lib/Transforms/IPO/OpenMPOpt.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/IPO/OpenMPOpt.cpp b/llvm/lib/Transforms/IPO/OpenMPOpt.cpp
index 3d03fc546f5c7..7eb3117c4a549 100644
--- a/llvm/lib/Transforms/IPO/OpenMPOpt.cpp
+++ b/llvm/lib/Transforms/IPO/OpenMPOpt.cpp
@@ -1765,8 +1765,7 @@ struct OpenMPOpt {
struct ExternalizationRAII {
ExternalizationRAII(OMPInformationCache &OMPInfoCache,
RuntimeFunction RFKind)
- : OMPInfoCache(OMPInfoCache),
- Declaration(OMPInfoCache.RFIs[RFKind].Declaration) {
+ : Declaration(OMPInfoCache.RFIs[RFKind].Declaration) {
if (!Declaration)
return;
@@ -1781,7 +1780,6 @@ struct OpenMPOpt {
Declaration->setLinkage(LinkageType);
}
- OMPInformationCache &OMPInfoCache;
Function *Declaration;
GlobalValue::LinkageTypes LinkageType;
};
More information about the llvm-commits
mailing list