mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Add suggestions on misspelled PLI functions.
This commit is contained in:
+7
-1
@@ -67,6 +67,7 @@
|
||||
|
||||
#include "V3Graph.h"
|
||||
#include "V3MemberMap.h"
|
||||
#include "V3Parse.h"
|
||||
#include "V3String.h"
|
||||
#include "V3SymTable.h"
|
||||
|
||||
@@ -3355,8 +3356,13 @@ class LinkDotResolveVisitor final : public VNVisitor {
|
||||
VL_DO_DANGLING(nodep->deleteTree(), nodep);
|
||||
return;
|
||||
} else {
|
||||
VSpellCheck speller;
|
||||
V3Parse::candidatePli(&speller);
|
||||
const string suggest = speller.bestCandidateMsg(nodep->prettyName());
|
||||
nodep->v3error(
|
||||
"Unsupported or unknown PLI call: " << nodep->prettyNameQ());
|
||||
"Unsupported or unknown PLI call: "
|
||||
<< nodep->prettyNameQ() << '\n'
|
||||
<< (suggest.empty() ? "" : nodep->warnMore() + suggest));
|
||||
}
|
||||
} else {
|
||||
const string suggest = m_statep->suggestSymFallback(
|
||||
|
||||
Reference in New Issue
Block a user