[llvm] f09f4b2 - [OpenMPOpt] Initialize value to avoid use of uninitialized memory
Johannes Doerfert via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 23 17:18:41 PDT 2020
Author: Johannes Doerfert
Date: 2020-03-23T19:17:19-05:00
New Revision: f09f4b26762ab5d5c15ab6f66eb02a497c5f0b8e
URL: https://github.com/llvm/llvm-project/commit/f09f4b26762ab5d5c15ab6f66eb02a497c5f0b8e
DIFF: https://github.com/llvm/llvm-project/commit/f09f4b26762ab5d5c15ab6f66eb02a497c5f0b8e.diff
LOG: [OpenMPOpt] Initialize value to avoid use of uninitialized memory
This should fix the issue reported here:
https://reviews.llvm.org/D76058#1937554
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 ca52a618be4c..8b45350ce44c 100644
--- a/llvm/lib/Transforms/IPO/OpenMPOpt.cpp
+++ b/llvm/lib/Transforms/IPO/OpenMPOpt.cpp
@@ -79,7 +79,7 @@ struct OpenMPOpt {
SmallVector<Type *, 8> ArgumentTypes;
/// The declaration if available.
- Function *Declaration;
+ Function *Declaration = nullptr;
/// Uses of this runtime function per function containing the use.
DenseMap<Function *, SmallPtrSet<Use *, 16>> UsesMap;
More information about the llvm-commits
mailing list