authorgravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2019-10-12 16:25:51+02:00
committergravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2019-10-12 16:25:51+02:00
log3ea0a76fb66bd94ea4b1381f58791513fadf6a04
treea61e5b453358015f25b196d7fcfa6ae0658a327d
parentfd4c8a40e94d4717df59700371c6e60651cf5e0d

More clang API changes


2 files changed, 5 insertions(+), 4 deletions(-)

src/zig_clang.cpp+3-2
...@@ -1831,14 +1831,15 @@ ZigClangASTUnit *ZigClangLoadFromCommandLine(const char **args_begin, const char...@@ -1831,14 +1831,15 @@ ZigClangASTUnit *ZigClangLoadFromCommandLine(const char **args_begin, const char
1831 bool allow_pch_with_compiler_errors = false;1831 bool allow_pch_with_compiler_errors = false;
1832 bool single_file_parse = false;1832 bool single_file_parse = false;
1833 bool for_serialization = false;1833 bool for_serialization = false;
1834 bool retain_excluded_conditional_blocks = false;
1834 std::unique_ptr<clang::ASTUnit> *err_unit = new std::unique_ptr<clang::ASTUnit>();1835 std::unique_ptr<clang::ASTUnit> *err_unit = new std::unique_ptr<clang::ASTUnit>();
1835 clang::ASTUnit *ast_unit = clang::ASTUnit::LoadFromCommandLine(1836 clang::ASTUnit *ast_unit = clang::ASTUnit::LoadFromCommandLine(
1836 args_begin, args_end,1837 args_begin, args_end,
1837 pch_container_ops, diags, resources_path,1838 pch_container_ops, diags, resources_path,
1838 only_local_decls, clang::CaptureDiagsKind::All, clang::None, true, 0, clang::TU_Complete,1839 only_local_decls, clang::CaptureDiagsKind::All, clang::None, true, 0, clang::TU_Complete,
1839 false, false, allow_pch_with_compiler_errors, clang::SkipFunctionBodiesScope::None,1840 false, false, allow_pch_with_compiler_errors, clang::SkipFunctionBodiesScope::None,
1840 single_file_parse, user_files_are_volatile, for_serialization, clang::None, err_unit,1841 single_file_parse, user_files_are_volatile, for_serialization, retain_excluded_conditional_blocks,
1841 nullptr);1842 clang::None, err_unit, nullptr);
18421843
1843 // Early failures in LoadFromCommandLine may return with ErrUnit unset.1844 // Early failures in LoadFromCommandLine may return with ErrUnit unset.
1844 if (!ast_unit && !err_unit) {1845 if (!ast_unit && !err_unit) {
src/zig_clang_cc1_main.cpp+2-2
...@@ -208,10 +208,10 @@ int cc1_main(ArrayRef<const char *> Argv, const char *Argv0, void *MainAddr) {...@@ -208,10 +208,10 @@ int cc1_main(ArrayRef<const char *> Argv, const char *Argv0, void *MainAddr) {
208 TextDiagnosticBuffer *DiagsBuffer = new TextDiagnosticBuffer;208 TextDiagnosticBuffer *DiagsBuffer = new TextDiagnosticBuffer;
209 DiagnosticsEngine Diags(DiagID, &*DiagOpts, DiagsBuffer);209 DiagnosticsEngine Diags(DiagID, &*DiagOpts, DiagsBuffer);
210 bool Success = CompilerInvocation::CreateFromArgs(210 bool Success = CompilerInvocation::CreateFromArgs(
211 Clang->getInvocation(), Argv.begin(), Argv.end(), Diags);211 Clang->getInvocation(), Argv, Diags);
212212
213 if (Clang->getFrontendOpts().TimeTrace)213 if (Clang->getFrontendOpts().TimeTrace)
214 llvm::timeTraceProfilerInitialize();214 llvm::timeTraceProfilerInitialize(/* granularity (us) */ 500);
215215
216 // --print-supported-cpus takes priority over the actual compilation.216 // --print-supported-cpus takes priority over the actual compilation.
217 if (Clang->getFrontendOpts().PrintSupportedCPUs)217 if (Clang->getFrontendOpts().PrintSupportedCPUs)