citrun

watch C/C++ source code execute
Log | Files | Refs | LICENSE

commit 12e912a9ec9311fe979ab3abbb0dd9a030061ea1
parent 9df8ce9c0dd4554735f7d83d42319dd804855b61
Author: Kyle Milz <kyle@0x30.net>
Date:   Sat, 13 Aug 2016 21:58:09 -0600

src: move some logging into main

Diffstat:
Msrc/inst_frontend.cc | 4+---
Msrc/inst_main.cc | 1+
Mt/inst_log.t | 4+---
3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/inst_frontend.cc b/src/inst_frontend.cc @@ -204,9 +204,7 @@ InstrumentFrontend::instrument() std::unique_ptr<InstrumentActionFactory> f = llvm::make_unique<InstrumentActionFactory>(m_log, m_is_citruninst, m_source_files); - int ret = Tool.run(f.get()); - *m_log << "Instrumentation " << (ret ? "failed.\n" : "successful.\n"); - return ret; + return Tool.run(f.get()); } int diff --git a/src/inst_main.cc b/src/inst_main.cc @@ -123,6 +123,7 @@ main(int argc, char *argv[]) main.process_cmdline(); int ret = main.instrument(); + llog << "Instrumentation " << (ret ? "failed.\n" : "successful.\n"); std::chrono::high_resolution_clock::time_point now = std::chrono::high_resolution_clock::now(); diff --git a/t/inst_log.t b/t/inst_log.t @@ -50,9 +50,8 @@ citrun-inst 0.0 () Tool called as ''. Resource directory is '' PATH='' -Command line is ''. Found source file ''. -Object arg = 1, compile arg = 1 +Command line is ''. Added clangtool argument ''. Instrumentation of '' finished: 22 Lines of source code @@ -74,7 +73,6 @@ Tool called as ''. Resource directory is '' PATH='' Command line is ''. -Object arg = 1, compile arg = 0 Link detected, adding '' to command line. No source files found. Executing command line. EOF