return atomContentType == typeCFI;
}
- // Returns true if lhs should be placed before rhs in the final output.
- static bool compareByPosition(const DefinedAtom *lhs,
- const DefinedAtom *rhs);
-
protected:
// DefinedAtom is an abstract base class. Only subclasses can access
// constructor.
llvm_unreachable("unknown content type");
}
-bool DefinedAtom::compareByPosition(const DefinedAtom *lhs,
- const DefinedAtom *rhs) {
- if (lhs == rhs)
- return false;
- const File *lhsFile = &lhs->file();
- const File *rhsFile = &rhs->file();
- if (lhsFile->ordinal() != rhsFile->ordinal())
- return lhsFile->ordinal() < rhsFile->ordinal();
- assert(lhs->ordinal() != rhs->ordinal());
- return lhs->ordinal() < rhs->ordinal();
-}
-
} // namespace