Skip to content

Commit

Permalink
Fixed missing brackets and added the rule back for the condition to c…
Browse files Browse the repository at this point in the history
…all clang init preprocessor which was taken out incorrectly by the last commit.
  • Loading branch information
hchen99 committed Apr 1, 2024
1 parent 9fb2f1d commit bc08a09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions trick_source/codegen/Interface_Code_Gen/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ int main(int argc, char * argv[]) {

#if (LIBCLANG_MAJOR >= 10) && (LIBCLANG_MAJOR < 18)
clang::InitializePreprocessor(pp, ppo, ci.getPCHContainerReader(), ci.getFrontendOpts());
#else
#elif (LIBCLANG_MAJOR >= 18)
clang::InitializePreprocessor(pp, ppo, ci.getPCHContainerReader(), ci.getFrontendOpts(), ci.getCodeGenOpts());
#endif

Expand Down Expand Up @@ -316,7 +316,7 @@ int main(int argc, char * argv[]) {
const clang::FileEntry* fileEntry = ci.getFileManager().getFile(inputFilePath);
#endif
free(inputFilePath);
#if (LIBCLANG_MAJOR > 3 && LIBCLANG_MAJOR < 18) || ((LIBCLANG_MAJOR == 3) && (LIBCLANG_MINOR >= 5))
#if ((LIBCLANG_MAJOR > 3 && LIBCLANG_MAJOR < 18)) || ((LIBCLANG_MAJOR == 3) && (LIBCLANG_MINOR >= 5))
ci.getSourceManager().setMainFileID(ci.getSourceManager().createFileID(fileEntry, clang::SourceLocation(), clang::SrcMgr::C_User));
#elif (LIBCLANG_MAJOR >= 18)
ci.getSourceManager().setMainFileID(ci.getSourceManager().createFileID(fileEntryRef, clang::SourceLocation(), clang::SrcMgr::C_User));
Expand Down

0 comments on commit bc08a09

Please sign in to comment.