From ecdc22b06c70debf16d2a1eaae2b280015730e10 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Mon, 28 Nov 2016 14:50:17 +0100 Subject: Added support for macros as include file names --- frontends/verilog/preproc.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'frontends/verilog/preproc.cc') diff --git a/frontends/verilog/preproc.cc b/frontends/verilog/preproc.cc index 0c6cfc6ac..df1005d10 100644 --- a/frontends/verilog/preproc.cc +++ b/frontends/verilog/preproc.cc @@ -292,6 +292,8 @@ std::string frontend_verilog_preproc(std::istream &f, std::string filename, cons if (tok == "`include") { skip_spaces(); std::string fn = next_token(true); + while (fn.size() > 1 && fn[0] == '`' && defines_map.count(fn.substr(1)) > 0) + fn = defines_map.at(fn.substr(1)); while (1) { size_t pos = fn.find('"'); if (pos == std::string::npos) -- cgit v1.2.3