projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c7f6fb6
)
Added support for macros as include file names
author
Clifford Wolf
<clifford@clifford.at>
Mon, 28 Nov 2016 13:50:17 +0000
(14:50 +0100)
committer
Clifford Wolf
<clifford@clifford.at>
Mon, 28 Nov 2016 13:50:17 +0000
(14:50 +0100)
frontends/verilog/preproc.cc
patch
|
blob
|
history
diff --git
a/frontends/verilog/preproc.cc
b/frontends/verilog/preproc.cc
index 0c6cfc6ac893ac7af2c35c562f340e932c4d1333..df1005d105c3e72214fc070b38d0acddff939f32 100644
(file)
--- 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)