[NFC] const-ed the return type of FunctionPropertiesAnalysis

The result is a data bag, this makes sure it's signaled to a user that
the data can't be mutated when, for example, doing something like:

auto &R = FAM.getResult<FunctionPropertiesAnalysis>(F)
...
R.Uses++
This commit is contained in:
Mircea Trofin
2022-04-28 11:18:28 -07:00
parent a546b9b06b
commit 75881d8b02
2 changed files with 2 additions and 2 deletions

View File

@@ -66,7 +66,7 @@ class FunctionPropertiesAnalysis
public:
static AnalysisKey Key;
using Result = FunctionPropertiesInfo;
using Result = const FunctionPropertiesInfo;
Result run(Function &F, FunctionAnalysisManager &FAM);
};

View File

@@ -73,7 +73,7 @@ void FunctionPropertiesInfo::print(raw_ostream &OS) const {
AnalysisKey FunctionPropertiesAnalysis::Key;
FunctionPropertiesInfo
const FunctionPropertiesInfo
FunctionPropertiesAnalysis::run(Function &F, FunctionAnalysisManager &FAM) {
return FunctionPropertiesInfo::getFunctionPropertiesInfo(
F, FAM.getResult<LoopAnalysis>(F));