MCPcopy Create free account
hub / github.com/chipsalliance/Surelog / compile

Method compile

src/DesignCompile/CompileProgram.cpp:66–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66bool CompileProgram::compile() {
67 const FileContent* fC = m_program->m_fileContents[0];
68 NodeId nodeId = m_program->m_nodeIds[0];
69
70 Location loc(fC->getFileId(nodeId), fC->Line(nodeId), fC->Column(nodeId),
71 m_symbols->registerSymbol(m_program->getName()));
72
73 Error err1(ErrorDefinition::COMP_COMPILE_PROGRAM, loc);
74 ErrorContainer* errors =
75 new ErrorContainer(m_symbols, m_errors->getLogListener());
76 errors->registerCmdLine(
77 m_compileDesign->getCompiler()->getCommandLineParser());
78 errors->addError(err1);
79 errors->printMessage(
80 err1,
81 m_compileDesign->getCompiler()->getCommandLineParser()->muteStdout());
82 delete errors;
83
84 Error err2(ErrorDefinition::COMP_PROGRAM_OBSOLETE_USAGE, loc);
85 m_errors->addError(err2);
86
87 if (!collectObjects_(CollectType::FUNCTION)) return false;
88 if (!collectObjects_(CollectType::DEFINITION)) return false;
89 if (!collectObjects_(CollectType::OTHER)) return false;
90
91 return true;
92}
93
94bool CompileProgram::collectObjects_(CollectType collectType) {
95 const FileContent* fC = m_program->m_fileContents[0];

Callers 1

operator()Method · 0.45

Calls 12

getLogListenerMethod · 0.80
registerCmdLineMethod · 0.80
printMessageMethod · 0.80
muteStdoutMethod · 0.80
getFileIdMethod · 0.45
LineMethod · 0.45
ColumnMethod · 0.45
registerSymbolMethod · 0.45
getNameMethod · 0.45
getCommandLineParserMethod · 0.45
getCompilerMethod · 0.45
addErrorMethod · 0.45

Tested by

no test coverage detected