File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ // Copyright (c) 2022-present INESC-ID.
2+ // Distributed under the MIT license that can be found in the LICENSE file.
3+
4+ #include " logging.h"
5+
6+ namespace cpp2rust {
7+ namespace {
8+ llvm::raw_ostream *verrs_ = &llvm::nulls ();
9+ llvm::raw_ostream *vouts_ = &llvm::nulls ();
10+ } // namespace
11+
12+ void SetVerbose (bool verbose) {
13+ verrs_ = verbose ? &llvm::errs () : &llvm::nulls ();
14+ vouts_ = verbose ? &llvm::outs () : &llvm::nulls ();
15+ }
16+
17+ llvm::raw_ostream &verrs () { return *verrs_; }
18+ llvm::raw_ostream &vouts () { return *vouts_; }
19+
20+ } // namespace cpp2rust
Original file line number Diff line number Diff line change 1+ // Copyright (c) 2022-present INESC-ID.
2+ // Distributed under the MIT license that can be found in the LICENSE file.
3+
4+ #pragma once
5+
6+ #include < llvm/Support/raw_ostream.h>
7+
8+ namespace cpp2rust {
9+
10+ void SetVerbose (bool verbose);
11+
12+ llvm::raw_ostream &verrs ();
13+ llvm::raw_ostream &vouts ();
14+
15+ } // namespace cpp2rust
You can’t perform that action at this time.
0 commit comments