Internals: Merge AstCCast minwidth set. No functional change intended
This commit is contained in:
parent
cc1adf9b38
commit
b4a31bd292
|
|
@ -2882,10 +2882,11 @@ struct AstCCast : public AstNodeUniop {
|
|||
private:
|
||||
int m_size;
|
||||
public:
|
||||
AstCCast(FileLine* fl, AstNode* lhsp, int setwidth) : AstNodeUniop(fl, lhsp) {
|
||||
AstCCast(FileLine* fl, AstNode* lhsp, int setwidth, int minwidth=-1) : AstNodeUniop(fl, lhsp) {
|
||||
m_size=setwidth;
|
||||
if (setwidth) {
|
||||
dtypeSetLogicSized(setwidth,setwidth,AstNumeric::UNSIGNED);
|
||||
if (minwidth==-1) minwidth=setwidth;
|
||||
dtypeSetLogicSized(setwidth,minwidth,AstNumeric::UNSIGNED);
|
||||
}
|
||||
}
|
||||
AstCCast(FileLine* fl, AstNode* lhsp, AstNode* typeFromp) : AstNodeUniop(fl, lhsp) {
|
||||
|
|
|
|||
|
|
@ -77,8 +77,7 @@ private:
|
|||
AstNRelinker relinkHandle;
|
||||
nodep->unlinkFrBack(&relinkHandle);
|
||||
//
|
||||
AstCCast* castp = new AstCCast (nodep->fileline(), nodep, needsize);
|
||||
castp->width(needsize, nodep->widthMin());
|
||||
AstCCast* castp = new AstCCast (nodep->fileline(), nodep, needsize, nodep->widthMin());
|
||||
relinkHandle.relink(castp);
|
||||
//if (debug()>8) castp->dumpTree(cout,"-castins: ");
|
||||
//
|
||||
|
|
|
|||
Loading…
Reference in New Issue