diff --git a/llvm/lib/Analysis/StackSafetyAnalysis.cpp b/llvm/lib/Analysis/StackSafetyAnalysis.cpp index 023a72df1ca10..9947ddaf00714 100644 --- a/llvm/lib/Analysis/StackSafetyAnalysis.cpp +++ b/llvm/lib/Analysis/StackSafetyAnalysis.cpp @@ -122,8 +122,9 @@ template struct UseInfo { // function argument). Range should never set to empty-set, that is an invalid // access range that can cause empty-set to be propagated with // ConstantRange::add - std::map, ConstantRange, typename CallInfo::Less> - Calls; + using CallsTy = std::map, ConstantRange, + typename CallInfo::Less>; + CallsTy Calls; UseInfo(unsigned PointerSize) : Range{PointerSize, false} {} @@ -691,7 +692,7 @@ const ConstantRange *findParamAccess(const FunctionSummary &FS, void resolveAllCalls(UseInfo &Use, const ModuleSummaryIndex *Index) { ConstantRange FullSet(Use.Range.getBitWidth(), true); - auto TmpCalls = std::move(Use.Calls); + UseInfo::CallsTy TmpCalls = std::move(Use.Calls); for (const auto &C : TmpCalls) { const Function *F = findCalleeInModule(C.first.Callee); if (F) {