[llvm-branch-commits] [clang] [Clang] Load pass plugins before parsing LLVM options (PR #171868)

Tarun Prabhu via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Dec 16 06:53:25 PST 2025


================
@@ -644,6 +648,12 @@ class CompilerInstance : public ModuleLoader {
   /// the compiler instance takes ownership of \p Value.
   void setCodeCompletionConsumer(CodeCompleteConsumer *Value);
 
+  /// }
+  /// @name Back-end Pass Plugins
+  /// @{
+
+  std::vector<llvm::PassPlugin *> &getPassPlugins() { return PassPlugins; }
----------------
tarunprabhu wrote:

```suggestion
  llvm::ArrayRef<llvm::PassPlugin*> getPassPlugins() { return PassPlugins; }
```

This may be better than returning a mutable reference to an `std::vector`.

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


More information about the llvm-branch-commits mailing list