llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: None (Sirraide)

<details>
<summary>Changes</summary>

There is currently no way to actually access `ASTUnit::CodeGenOpts`; this is 
almost certainly an oversight, so this adds a getter for it.

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


1 Files Affected:

- (modified) clang/include/clang/Frontend/ASTUnit.h (+5) 


``````````diff
diff --git a/clang/include/clang/Frontend/ASTUnit.h 
b/clang/include/clang/Frontend/ASTUnit.h
index 341460e1962cb..0e3c52ae59320 100644
--- a/clang/include/clang/Frontend/ASTUnit.h
+++ b/clang/include/clang/Frontend/ASTUnit.h
@@ -476,6 +476,11 @@ class ASTUnit {
     return *LangOpts;
   }
 
+  const CodeGenOptions &getCodeGenOpts() const {
+    assert(CodeGenOpts && "ASTUnit does not have codegen options");
+    return *CodeGenOpts;
+  }
+
   const HeaderSearchOptions &getHeaderSearchOpts() const {
     assert(HSOpts && "ASTUnit does not have header search options");
     return *HSOpts;

``````````

</details>


https://github.com/llvm/llvm-project/pull/172164
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to