Internals: Add charIQWN. Proper capitalization.

This commit is contained in:
Wilson Snyder 2017-12-09 14:44:55 -05:00
parent 08da777b33
commit ea91b10086
3 changed files with 5 additions and 6 deletions

View File

@ -1739,6 +1739,7 @@ public:
pair<uint32_t,uint32_t> dimensions(bool includeBasic);
uint32_t arrayUnpackedElements(); // 1, or total multiplication of all dimensions
static int uniqueNumInc() { return ++s_uniqueNum; }
const char* charIQWN() const { return (isString() ? "N" : isWide() ? "W" : isQuad() ? "Q" : "I"); }
};
class AstNodeClassDType : public AstNodeDType {

View File

@ -81,10 +81,8 @@ public:
void emitVarCtors();
bool emitSimpleOk(AstNodeMath* nodep);
void emitIQW(AstNode* nodep) {
// Other abbrevs: "C"har, "S"hort, "F"loat, "D"ouble, stri"N"g
puts (nodep->isString() ? "N"
: nodep->isWide() ? "W"
: nodep->isQuad() ? "Q" : "I");
// Other abbrevs: "C"har, "S"hort, "F"loat, "D"ouble, stri"N"g
puts (nodep->dtypep()->charIQWN());
}
void emitScIQW(AstVar* nodep) {
if (!nodep->isSc()) nodep->v3fatalSrc("emitting SystemC operator on non-SC variable");

View File

@ -576,12 +576,12 @@ void EmitCSyms::emitDpiHdr() {
AstCFunc* nodep = *it;
if (nodep->dpiExportWrapper()) {
if (!firstExp++) puts("\n// DPI EXPORTS\n");
puts("// DPI Export at "+nodep->fileline()->ascii()+"\n");
puts("// DPI export at "+nodep->fileline()->ascii()+"\n");
puts("extern "+nodep->rtnTypeVoid()+" "+nodep->name()+" ("+cFuncArgs(nodep)+");\n");
}
else if (nodep->dpiImport()) {
if (!firstImp++) puts("\n// DPI IMPORTS\n");
puts("// DPI Import at "+nodep->fileline()->ascii()+"\n");
puts("// DPI import at "+nodep->fileline()->ascii()+"\n");
puts("extern "+nodep->rtnTypeVoid()+" "+nodep->name()+" ("+cFuncArgs(nodep)+");\n");
}
}