Ignore:
Timestamp:
Jan 16, 2018, 4:22:13 PM (21 months ago)
Author:
nmedfort
Message:

Added PabloBlock/Builder? createScope() methods + minor code changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/cc/multiplex_CCs.cpp

    r5816 r5836  
    123123        cc::doMultiplexCCs(CCs, mExclusiveSetIDs, mMultiplexedCCs);
    124124}
    125 
    126 const Alphabet * MultiplexedAlphabet::getSourceAlphabet() const {
    127     return mSourceAlphabet;
    128 }
    129 
    130 std::vector<std::vector<unsigned>> MultiplexedAlphabet::getExclusiveSetIDs() {
    131     return mExclusiveSetIDs;
    132 }
    133 
    134 std::vector<re::CC *> MultiplexedAlphabet::getMultiplexedCCs() {
    135     return mMultiplexedCCs;
    136 }
    137125   
    138126re::CC * MultiplexedAlphabet::transformCC(const re::CC * sourceCC) const {
    139     if (sourceCC->getAlphabet() != mSourceAlphabet) llvm::report_fatal_error("Mismatched source alphabets for transformCC");
    140    
    141     const auto index = find(mUnicodeSets.begin(), mUnicodeSets.end(), sourceCC) - mUnicodeSets.begin();
    142     if (index >= mUnicodeSets.size()) {
    143         llvm::errs() << Printer_RE::PrintRE(sourceCC) << " not found\n";
     127    if (sourceCC->getAlphabet() != mSourceAlphabet) {
     128        llvm::report_fatal_error("Mismatched source alphabets for transformCC");
    144129    }
     130    const auto f = find(mUnicodeSets.begin(), mUnicodeSets.end(), sourceCC);
     131    if (f == mUnicodeSets.end()) {
     132        llvm::report_fatal_error(Printer_RE::PrintRE(sourceCC) + " not found");
     133    }
     134    const auto index = f - mUnicodeSets.begin();
    145135    const auto exclusive_IDs = mExclusiveSetIDs[index];
    146136    re::CC * CC_union = re::makeCC(this);
Note: See TracChangeset for help on using the changeset viewer.