diff options
author | Sven Verdoolaege <skimo@kotnet.org> | 2013-04-07 13:13:14 +0200 |
---|---|---|
committer | Sven Verdoolaege <skimo@kotnet.org> | 2013-04-07 15:50:45 +0200 |
commit | da67c73305ad02c118b3234ee52dbbc00677f3a3 (patch) | |
tree | 0e03ba55f9abd7a1f90ab0a00cd661dd49fbf53f /interface | |
parent | 07bca32eef20102a070cc4c8d6a86f1aa8d8560e (diff) | |
download | isl-da67c73305ad02c118b3234ee52dbbc00677f3a3.tar.gz isl-da67c73305ad02c118b3234ee52dbbc00677f3a3.tar.bz2 isl-da67c73305ad02c118b3234ee52dbbc00677f3a3.zip |
update for change in arguments of clang's CompilerInstance::createDiagnostics
In particular, CompilerInstance::createDiagnostics no longer takes
argc and argv as arugments.
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
Diffstat (limited to 'interface')
-rw-r--r-- | interface/extract_interface.cc | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/interface/extract_interface.cc b/interface/extract_interface.cc index a050293f..acf7c85c 100644 --- a/interface/extract_interface.cc +++ b/interface/extract_interface.cc @@ -238,12 +238,28 @@ static TargetInfo *create_target_info(CompilerInstance *Clang, #endif +#ifdef CREATEDIAGNOSTICS_TAKES_ARG + +static void create_diagnostics(CompilerInstance *Clang) +{ + Clang->createDiagnostics(0, NULL, construct_printer()); +} + +#else + +static void create_diagnostics(CompilerInstance *Clang) +{ + Clang->createDiagnostics(construct_printer()); +} + +#endif + int main(int argc, char *argv[]) { llvm::cl::ParseCommandLineOptions(argc, argv); CompilerInstance *Clang = new CompilerInstance(); - Clang->createDiagnostics(0, NULL, construct_printer()); + create_diagnostics(Clang); DiagnosticsEngine &Diags = Clang->getDiagnostics(); Diags.setSuppressSystemWarnings(true); CompilerInvocation *invocation = |