aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/StackSafetyAnalysis.cpp
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2020-09-18 17:08:21 -0700
committerVitaly Buka <vitalybuka@google.com>2020-09-18 17:10:28 -0700
commit97bfac076a068b658923aeba34d82df4ef097ba5 (patch)
tree78bb3bcd5f52dcffc3a5efda9745b498390604a9 /llvm/lib/Analysis/StackSafetyAnalysis.cpp
parent3ab118a57d3803f45e3fe95321654994f2c9e1a1 (diff)
downloadllvm-97bfac076a068b658923aeba34d82df4ef097ba5.zip
llvm-97bfac076a068b658923aeba34d82df4ef097ba5.tar.gz
llvm-97bfac076a068b658923aeba34d82df4ef097ba5.tar.bz2
[NFC][StackSafety] Replace auto with type
Fixes static analyzer is warning.
Diffstat (limited to 'llvm/lib/Analysis/StackSafetyAnalysis.cpp')
-rw-r--r--llvm/lib/Analysis/StackSafetyAnalysis.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/StackSafetyAnalysis.cpp b/llvm/lib/Analysis/StackSafetyAnalysis.cpp
index 023a72d..9947dda 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) {