~ubuntu-branches/ubuntu/wily/verilator/wily

« back to all changes in this revision

Viewing changes to src/V3Assert.cpp

  • Committer: Package Import Robot
  • Author(s): أحمد المحمودي (Ahmed El-Mahmoudy)
  • Date: 2014-09-28 12:18:43 UTC
  • mfrom: (1.2.29)
  • Revision ID: package-import@ubuntu.com-20140928121843-x25dh09ebwng7afl
Tags: 3.864-1
* New upstream release.
* debian/upstream/metadata: Add upstream metadata information
* debian/control: Bump Standards-Version to 3.9.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
    void replaceDisplay(AstDisplay* nodep, const string& prefix) {
62
62
        nodep->displayType(AstDisplayType::DT_WRITE);
63
63
        nodep->fmtp()->text(assertDisplayMessage(nodep, prefix, nodep->fmtp()->text()));
64
 
        AstNode* timesp = nodep->fmtp()->exprsp(); if (timesp) timesp->unlinkFrBack();
65
64
        // cppcheck-suppress nullPointer
66
 
        timesp = timesp->addNext(new AstTime(nodep->fileline()));
67
 
        nodep->fmtp()->exprsp(timesp);
 
65
        AstNode* timenewp = new AstTime(nodep->fileline());
 
66
        if (AstNode* timesp = nodep->fmtp()->exprsp()) {
 
67
            timesp->unlinkFrBackWithNext();
 
68
            timenewp->addNext(timesp);
 
69
        }
 
70
        nodep->fmtp()->exprsp(timenewp);
68
71
        if (!nodep->fmtp()->scopeNamep() && nodep->fmtp()->formatScopeTracking()) {
69
72
            nodep->fmtp()->scopeNamep(new AstScopeName(nodep->fileline()));
70
73
        }