Skip to content

Added spelled-out aliases for abbreviated predicate cases. #66

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 13, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions Sources/LLVM/Predicates+ExpandedNames.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
extension IntPredicate {
/// Yields `true` if the operands are equal, false otherwise without sign
/// interpretation.
static let equal = eq
/// Yields `true` if the operands are unequal, false otherwise without sign
/// interpretation.
static let notEqual = ne

/// Interprets the operands as unsigned values and yields true if the first is
/// greater than the second.
static let unsignedGreaterThan = ugt
/// Interprets the operands as unsigned values and yields true if the first is
/// greater than or equal to the second.

static let unsignedGreaterThanOrEqual = uge
/// Interprets the operands as unsigned values and yields true if the first is
/// less than the second.
static let unsignedLessThan = ult
/// Interprets the operands as unsigned values and yields true if the first is
/// less than or equal to the second.
static let unsignedLessThanOrEqual = ule

/// Interprets the operands as signed values and yields true if the first is
/// greater than the second.
static let signedGreaterThan = sgt
/// Interprets the operands as signed values and yields true if the first is
/// greater than or equal to the second.
static let signedGreaterThanOrEqual = sge
/// Interprets the operands as signed values and yields true if the first is
/// less than the second.
static let signedLessThan = slt
/// Interprets the operands as signed values and yields true if the first is
/// less than or equal to the second.
static let signedLessThanOrEqual = sle
}

extension RealPredicate {
/// Ordered and equal.
static let orderedEqual = oeq
/// Ordered greater than.
static let orderedGreaterThan = ogt
/// Ordered greater than or equal.
static let orderedGreaterThanOrEqual = oge
/// Ordered less than.
static let orderedLessThan = olt
/// Ordered less than or equal.
static let orderedLessThanOrEqual = ole
/// Ordered and not equal.
static let orderedNotEqual = one
/// Oredered (no nans).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you fix this and the corresponding one in RealPredicate?

static let ordered = ord
/// Unordered (either nans).
static let unordered = uno
/// Unordered or equal.
static let unorderedEqual = ueq
/// Unordered or greater than.
static let unorderedGreaterThan = ugt
/// Unordered or greater than or equal.
static let unorderedGreaterThanOrEqual = uge
/// Unordered or less than.
static let unorderedLessThan = ult
/// Unordered or less than or equal.
static let unorderedLessThanOrEqual = ule
/// Unordered or not equal.
static let unorderedNotEqual = une
}