Fixed Verilog pre-processor for files with no trailing newline
authorClifford Wolf <clifford@clifford.at>
Tue, 29 Jul 2014 18:14:25 +0000 (20:14 +0200)
committerClifford Wolf <clifford@clifford.at>
Tue, 29 Jul 2014 18:14:25 +0000 (20:14 +0200)
frontends/verilog/preproc.cc

index 67b2ffa7c0ea22b34cb5b28f267dc87e93a2cd28..9ff68822ed52b0e54fb75f0e06f69fa7f3667a4c 100644 (file)
@@ -198,7 +198,7 @@ static void input_file(FILE *f, std::string filename)
                buffer[rc] = 0;
                input_buffer.insert(it, buffer);
        }
-       input_buffer.insert(it, "`file_pop\n");
+       input_buffer.insert(it, "\n`file_pop\n");
 }
 
 std::string frontend_verilog_preproc(FILE *f, std::string filename, const std::map<std::string, std::string> pre_defines_map, const std::list<std::string> include_dirs)