[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:
@@ -66,7 +66,7 @@ class FunctionPropertiesAnalysis
|
||||
public:
|
||||
static AnalysisKey Key;
|
||||
|
||||
using Result = FunctionPropertiesInfo;
|
||||
using Result = const FunctionPropertiesInfo;
|
||||
|
||||
Result run(Function &F, FunctionAnalysisManager &FAM);
|
||||
};
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user