[clang-tools-extra] Clean up strange uses of getAnalysisIfAvailable (PR #65729)
Jay Foad via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 11 02:44:04 PDT 2023
================
@@ -3280,7 +3280,7 @@ class llvm::gvn::GVNLegacyPass : public FunctionPass {
if (skipFunction(F))
return false;
- auto *LIWP = getAnalysisIfAvailable<LoopInfoWrapperPass>();
+ auto &LIWP = getAnalysis<LoopInfoWrapperPass>();
----------------
jayfoad wrote:
I prefer not to leave it as is - I think either we should get the analysis with `getAnalysis` or we should remove the `addRequired`, so that they are consistent with each other.
https://github.com/llvm/llvm-project/pull/65729
More information about the cfe-commits
mailing list