[llvm] 97bfac0 - [NFC][StackSafety] Replace auto with type

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 18 17:10:52 PDT 2020


Author: Vitaly Buka
Date: 2020-09-18T17:10:28-07:00
New Revision: 97bfac076a068b658923aeba34d82df4ef097ba5

URL: https://github.com/llvm/llvm-project/commit/97bfac076a068b658923aeba34d82df4ef097ba5
DIFF: https://github.com/llvm/llvm-project/commit/97bfac076a068b658923aeba34d82df4ef097ba5.diff

LOG: [NFC][StackSafety] Replace auto with type

Fixes static analyzer is warning.

Added: 
    

Modified: 
    llvm/lib/Analysis/StackSafetyAnalysis.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Analysis/StackSafetyAnalysis.cpp b/llvm/lib/Analysis/StackSafetyAnalysis.cpp
index 023a72df1ca1..9947ddaf0071 100644
--- a/llvm/lib/Analysis/StackSafetyAnalysis.cpp
+++ b/llvm/lib/Analysis/StackSafetyAnalysis.cpp
@@ -122,8 +122,9 @@ template <typename CalleeTy> 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<CallInfo<CalleeTy>, ConstantRange, typename CallInfo<CalleeTy>::Less>
-      Calls;
+  using CallsTy = std::map<CallInfo<CalleeTy>, ConstantRange,
+                           typename CallInfo<CalleeTy>::Less>;
+  CallsTy Calls;
 
   UseInfo(unsigned PointerSize) : Range{PointerSize, false} {}
 
@@ -691,7 +692,7 @@ const ConstantRange *findParamAccess(const FunctionSummary &FS,
 void resolveAllCalls(UseInfo<GlobalValue> &Use,
                      const ModuleSummaryIndex *Index) {
   ConstantRange FullSet(Use.Range.getBitWidth(), true);
-  auto TmpCalls = std::move(Use.Calls);
+  UseInfo<GlobalValue>::CallsTy TmpCalls = std::move(Use.Calls);
   for (const auto &C : TmpCalls) {
     const Function *F = findCalleeInModule(C.first.Callee);
     if (F) {


        


More information about the llvm-commits mailing list