Skip to content

Commit a5625ed

Browse files
authored
[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.
1 parent 2490bb7 commit a5625ed

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

clang/include/clang/Frontend/ASTUnit.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,11 @@ class ASTUnit {
476476
return *LangOpts;
477477
}
478478

479+
const CodeGenOptions &getCodeGenOpts() const {
480+
assert(CodeGenOpts && "ASTUnit does not have codegen options");
481+
return *CodeGenOpts;
482+
}
483+
479484
const HeaderSearchOptions &getHeaderSearchOpts() const {
480485
assert(HSOpts && "ASTUnit does not have header search options");
481486
return *HSOpts;

0 commit comments

Comments
 (0)