From f09f4b26762ab5d5c15ab6f66eb02a497c5f0b8e Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Mon, 23 Mar 2020 19:14:34 -0500 Subject: [PATCH] [OpenMPOpt] Initialize value to avoid use of uninitialized memory This should fix the issue reported here: https://reviews.llvm.org/D76058#1937554 --- llvm/lib/Transforms/IPO/OpenMPOpt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ArgumentTypes; /// The declaration if available. - Function *Declaration; + Function *Declaration = nullptr; /// Uses of this runtime function per function containing the use. DenseMap> UsesMap;