Author: Sirraide
Date: 2025-12-13T19:05:29Z
New Revision: a5625ed1280f520b431b625b921fe98afe9af047

URL: 
https://github.com/llvm/llvm-project/commit/a5625ed1280f520b431b625b921fe98afe9af047
DIFF: 
https://github.com/llvm/llvm-project/commit/a5625ed1280f520b431b625b921fe98afe9af047.diff

LOG: [Clang] [NFC] Add an accessor for `ASTUnit::CodeGenOpts` (#172164)

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

Added: 
    

Modified: 
    clang/include/clang/Frontend/ASTUnit.h

Removed: 
    


################################################################################
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;


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

Reply via email to