[llvm] d0580b8 - [FunctionImport] Initialize Reason
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 27 19:47:41 PDT 2023
Author: Fangrui Song
Date: 2023-08-27T19:47:37-07:00
New Revision: d0580b855708e3ae10f4c77ee5a2dc40791c82f3
URL: https://github.com/llvm/llvm-project/commit/d0580b855708e3ae10f4c77ee5a2dc40791c82f3
DIFF: https://github.com/llvm/llvm-project/commit/d0580b855708e3ae10f4c77ee5a2dc40791c82f3.diff
LOG: [FunctionImport] Initialize Reason
Otherwise -print-import-failure may use the uninitialized value.
Added:
Modified:
llvm/lib/Transforms/IPO/FunctionImport.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/IPO/FunctionImport.cpp b/llvm/lib/Transforms/IPO/FunctionImport.cpp
index f301372b27c46b..990a8a9cd433d7 100644
--- a/llvm/lib/Transforms/IPO/FunctionImport.cpp
+++ b/llvm/lib/Transforms/IPO/FunctionImport.cpp
@@ -482,7 +482,7 @@ static void computeImportForFunction(
continue;
}
- FunctionImporter::ImportFailureReason Reason;
+ FunctionImporter::ImportFailureReason Reason{};
CalleeSummary = selectCallee(Index, VI.getSummaryList(), NewThreshold,
Summary.modulePath(), Reason);
if (!CalleeSummary) {
More information about the llvm-commits
mailing list