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

Method compile

src/SourceCompile/CompileSourceFile.cpp:90–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90bool CompileSourceFile::compile(Action action) {
91 m_action = action;
92 if (m_commandLineParser->verbose()) {
93 Location loc(m_fileId);
94 ErrorDefinition::ErrorType type =
95 ErrorDefinition::PP_PROCESSING_SOURCE_FILE;
96 switch (m_action) {
97 case Preprocess:
98 case PostPreprocess:
99 type = ErrorDefinition::PP_PROCESSING_SOURCE_FILE;
100 break;
101 case Parse:
102 type = ErrorDefinition::PA_PROCESSING_SOURCE_FILE;
103 break;
104 case PythonAPI:
105 type = ErrorDefinition::PY_PROCESSING_SOURCE_FILE;
106 break;
107 }
108 if (action != PostPreprocess) {
109 Error err(type, loc);
110 m_errors->printMessage(m_errors->addError(err, true));
111 }
112 }
113
114 switch (m_action) {
115 case Preprocess:
116 return preprocess_();
117 case PostPreprocess:
118 return postPreprocess_();
119 case Parse:
120 return parse_();
121 case PythonAPI: {
122 return pythonAPI_();
123 }
124 }
125 return true;
126}
127
128CompileSourceFile::CompileSourceFile(const CompileSourceFile& orig) {}
129

Callers

nothing calls this directly

Calls 3

verboseMethod · 0.80
printMessageMethod · 0.80
addErrorMethod · 0.45

Tested by

no test coverage detected