mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-23 22:33:41 +00:00
Move source_location to register.h
Revert `PrettyHelp::get_current()` for no args since we can use `Pass::location` instead.
This commit is contained in:
parent
431cb2d1b9
commit
1efd3aeb7d
4 changed files with 30 additions and 28 deletions
|
@ -23,19 +23,6 @@
|
|||
#include "kernel/yosys_common.h"
|
||||
#include "kernel/json.h"
|
||||
|
||||
#ifdef YOSYS_ENABLE_SOURCE_LOCATION
|
||||
#include <experimental/source_location>
|
||||
using std::experimental::source_location;
|
||||
#else
|
||||
struct source_location { // dummy placeholder
|
||||
int line() const { return 0; }
|
||||
int column() const { return 0; }
|
||||
const char* file_name() const { return "unknown"; }
|
||||
const char* function_name() const { return "unknown"; }
|
||||
static const source_location current(...) { return source_location(); }
|
||||
};
|
||||
#endif
|
||||
|
||||
YOSYS_NAMESPACE_BEGIN
|
||||
|
||||
struct ContentListing {
|
||||
|
@ -94,7 +81,7 @@ public:
|
|||
PrettyHelp(Mode mode = LOG);
|
||||
~PrettyHelp();
|
||||
|
||||
static PrettyHelp *get_current(source_location location = source_location::current());
|
||||
static PrettyHelp *get_current();
|
||||
|
||||
bool has_content() { return _root_listing.content.size();}
|
||||
const vector<ContentListing *> get_content() {
|
||||
|
@ -102,8 +89,6 @@ public:
|
|||
return content;
|
||||
}
|
||||
|
||||
const char* source_file() const { return _root_listing.source_file; }
|
||||
|
||||
void usage(
|
||||
const string &usage,
|
||||
const source_location location = source_location::current()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue