Ignore:
Timestamp:
Jul 5, 2017, 10:50:22 AM (8 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
0614d14
Parents:
11dbfe1 (diff), 307a732 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Constant.cc

    r11dbfe1 r67fa9f9  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Constant.cc -- 
     7// Constant.cc --
    88//
    99// Author           : Richard C. Bilson
     
    4646}
    4747
     48unsigned long long Constant::get_ival() const {
     49        assertf( safe_dynamic_cast<BasicType*>(type)->isInteger(), "Attempt to retrieve ival from non-integer constant." );
     50        return val.ival;
     51}
     52
     53double Constant::get_dval() const {
     54        assertf( ! safe_dynamic_cast<BasicType*>(type)->isInteger(), "Attempt to retrieve dval from integer constant." );
     55        return val.dval;
     56}
     57
    4858void Constant::print( std::ostream &os ) const {
    4959        os << "(" << rep << " " << val.ival;
Note: See TracChangeset for help on using the changeset viewer.