Ignore:
Timestamp:
Jan 19, 2017, 2:41:02 PM (2 years ago)
Author:
nmedfort
Message:

Code clean-up. Removed Pablo Call, SetIthBit? and Prototype.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/re/re_name.h

    r5234 r5267  
    44#include <re/re_re.h>
    55#include <re/re_cc.h>
    6 #include <string>
     6#include <llvm/Support/Casting.h>
    77
    88namespace UCD {
     
    102102
    103103inline bool Name::operator < (const Name & other) const {
    104     if (LLVM_LIKELY(mDefinition && other.mDefinition && isa<CC>(mDefinition) && isa<CC>(other.mDefinition))) {
    105         return *cast<CC>(mDefinition) < *cast<CC>(other.mDefinition);
     104    if (LLVM_LIKELY(mDefinition && other.mDefinition && llvm::isa<CC>(mDefinition) && llvm::isa<CC>(other.mDefinition))) {
     105        return *llvm::cast<CC>(mDefinition) < *llvm::cast<CC>(other.mDefinition);
    106106    } else if (mNamespaceLength < other.mNamespaceLength) {
    107107        return true;
     
    123123
    124124inline bool Name::operator < (const CC & other) const {
    125     if (mDefinition && isa<CC>(mDefinition)) {
    126         return *cast<CC>(mDefinition) < other;
     125    if (mDefinition && llvm::isa<CC>(mDefinition)) {
     126        return *llvm::cast<CC>(mDefinition) < other;
    127127    }
    128128    return false;
     
    130130
    131131inline bool Name::operator > (const CC & other) const {
    132     if (mDefinition && isa<CC>(mDefinition)) {
    133         return other < *cast<CC>(mDefinition);
     132    if (mDefinition && llvm::isa<CC>(mDefinition)) {
     133        return other < *llvm::cast<CC>(mDefinition);
    134134    }
    135135    return true;
     
    145145
    146146inline Name * makeName(const std::string & name, RE * cc) {
    147     if (isa<Name>(cc)) {
    148         return cast<Name>(cc);
     147    if (llvm::isa<Name>(cc)) {
     148        return llvm::cast<Name>(cc);
    149149    }
    150     else if (isa<CC>(cc)) {
    151         Name::Type ccType = cast<CC>(cc)->max_codepoint() <= 0x7F ? Name::Type::Byte : Name::Type::Unicode;
     150    else if (llvm::isa<CC>(cc)) {
     151        Name::Type ccType = llvm::cast<CC>(cc)->max_codepoint() <= 0x7F ? Name::Type::Byte : Name::Type::Unicode;
    152152        return new Name(nullptr, 0, name.c_str(), name.length(), ccType, cc);
    153153    }
Note: See TracChangeset for help on using the changeset viewer.