[llvm] change contents of ScalarEvolution from private to protected (PR #83052)

via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 26 12:06:42 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-analysis

Author: Joshua Ferguson (skewballfox)

<details>
<summary>Changes</summary>

hi, new to contributing to LLVM. Necessary to resolve [Enzyme#<!-- -->1607](https://github.com/EnzymeAD/Enzyme/issues/1607). Enzyme inherits from ScalarEvolution and was previously relying on `#define private public` to make this work. 

I ran this through clang format, and compiled both locally, if there is more test I need to run prior to pushing commits to PRs in the future, please let me know

---
Full diff: https://github.com/llvm/llvm-project/pull/83052.diff


1 Files Affected:

- (modified) llvm/include/llvm/Analysis/ScalarEvolution.h (+1-1) 


``````````diff
diff --git a/llvm/include/llvm/Analysis/ScalarEvolution.h b/llvm/include/llvm/Analysis/ScalarEvolution.h
index 0880f9c65aa45d..1b03437de30c28 100644
--- a/llvm/include/llvm/Analysis/ScalarEvolution.h
+++ b/llvm/include/llvm/Analysis/ScalarEvolution.h
@@ -1345,7 +1345,7 @@ class ScalarEvolution {
     }
   };
 
-private:
+protected:
   /// A CallbackVH to arrange for ScalarEvolution to be notified whenever a
   /// Value is deleted.
   class SCEVCallbackVH final : public CallbackVH {

``````````

</details>


https://github.com/llvm/llvm-project/pull/83052


More information about the llvm-commits mailing list