From 27c21cd61ec5b2e517ae0341c6d2b1141e90f5c7 Mon Sep 17 00:00:00 2001 From: Zuzana Baranova <xbaranov@fi.muni.cz> Date: Wed, 9 Jan 2019 14:18:54 +0000 Subject: [PATCH] CC: Drop the superfluous diag- prefix from Diagnostics attributes. --- divine/cc/cc1.hpp | 10 +++++----- divine/cc/driver.cpp | 4 ++-- tools/divcc.cpp | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/divine/cc/cc1.hpp b/divine/cc/cc1.hpp index 9bfaad792..3b39442b0 100644 --- a/divine/cc/cc1.hpp +++ b/divine/cc/cc1.hpp @@ -29,14 +29,14 @@ void initTargets(); struct Diagnostics { Diagnostics() - : diagPrinter( llvm::errs(), new clang::DiagnosticOptions() ), - diagEngine( + : printer( llvm::errs(), new clang::DiagnosticOptions() ), + engine( llvm::IntrusiveRefCntPtr< clang::DiagnosticIDs >( new clang::DiagnosticIDs() ), - new clang::DiagnosticOptions(), &diagPrinter, false ) + new clang::DiagnosticOptions(), &printer, false ) {} - clang::TextDiagnosticPrinter diagPrinter; - clang::DiagnosticsEngine diagEngine; + clang::TextDiagnosticPrinter printer; + clang::DiagnosticsEngine engine; }; /* diff --git a/divine/cc/driver.cpp b/divine/cc/driver.cpp index 2bbb5974d..bd71e7726 100644 --- a/divine/cc/driver.cpp +++ b/divine/cc/driver.cpp @@ -50,10 +50,10 @@ std::vector< Command > Driver::getJobs( llvm::ArrayRef< const char * > args ) using clang::driver::Compilation; Diagnostics diag; - clang::driver::Driver drv( "/usr/bin/false", LLVM_HOST_TRIPLE, diag.diagEngine ); + clang::driver::Driver drv( "/usr/bin/false", LLVM_HOST_TRIPLE, diag.engine ); Compilation* c = drv.BuildCompilation( args ); - if ( diag.diagEngine.hasErrorOccurred() ) + if ( diag.engine.hasErrorOccurred() ) throw cc::CompileError( "failed to get linker arguments, aborting" ); std::vector< Command > clangJobs; diff --git a/tools/divcc.cpp b/tools/divcc.cpp index 6dc0cbb21..737786d51 100644 --- a/tools/divcc.cpp +++ b/tools/divcc.cpp @@ -331,7 +331,7 @@ int main( int argc, char **argv ) if ( po.hasVersion ) std::cout << "divine version: " << ui::version() << "\n"; cc::Diagnostics diag; - driver::Driver drv( "/usr/bin/false", LLVM_HOST_TRIPLE, diag.diagEngine ); + driver::Driver drv( "/usr/bin/false", LLVM_HOST_TRIPLE, diag.engine ); drv.BuildCompilation( { "divcc", po.hasHelp? "--help" : "--version" } ); return 0; } -- GitLab