aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Expr/ExprPPrinter.cpp13
-rw-r--r--lib/Expr/Parser.cpp12
2 files changed, 3 insertions, 22 deletions
diff --git a/lib/Expr/ExprPPrinter.cpp b/lib/Expr/ExprPPrinter.cpp
index 691ccd89..7130da97 100644
--- a/lib/Expr/ExprPPrinter.cpp
+++ b/lib/Expr/ExprPPrinter.cpp
@@ -408,19 +408,6 @@ public:
bindings.insert(std::make_pair(e, counter++));
}
- // Detect Nz
- // FIXME: This should be in common code.
- if (const EqExpr *ee = dyn_cast<EqExpr>(e)) {
- if (ee->left == ConstantExpr::alloc(false, Expr::Bool)) {
- PC << "(Nz";
- printWidth(PC, e);
- PC << ' ';
- print(ee->right, PC);
- PC << ')';
- return;
- }
- }
-
// Detect multibyte reads.
// FIXME: Hrm. One problem with doing this is that we are
// masking the sharing of the indices which aren't
diff --git a/lib/Expr/Parser.cpp b/lib/Expr/Parser.cpp
index 85a9a1ac..11fb8546 100644
--- a/lib/Expr/Parser.cpp
+++ b/lib/Expr/Parser.cpp
@@ -776,12 +776,11 @@ ExprResult ParserImpl::ParseExpr(TypeResult ExpectedType) {
// Additional kinds for macro forms.
enum MacroKind {
- eMacroKind_Nz = Expr::LastKind + 1, // false == x
- eMacroKind_Neg, // 0 - x
- eMacroKind_ReadLSB, // Multibyte read
+ eMacroKind_ReadLSB = Expr::LastKind + 1, // Multibyte read
eMacroKind_ReadMSB, // Multibyte write
+ eMacroKind_Neg, // 0 - x // CrC: will disappear soon
eMacroKind_Concat, // Magic concatenation syntax
- eMacroKind_LastMacroKind = eMacroKind_ReadMSB
+ eMacroKind_LastMacroKind = eMacroKind_Concat
};
/// LookupExprInfo - Return information on the named token, if it is
@@ -807,9 +806,6 @@ static bool LookupExprInfo(const Token &Tok, unsigned &Kind,
if (memcmp(Tok.start, "Ne", 2) == 0)
return SetOK(Expr::Ne, false, 2);
- if (memcmp(Tok.start, "Nz", 2) == 0)
- return SetOK(eMacroKind_Nz, true, 1);
-
if (memcmp(Tok.start, "Or", 2) == 0)
return SetOK(Expr::Or, true, 2);
break;
@@ -1018,8 +1014,6 @@ ExprResult ParserImpl::ParseUnaryParenExpr(const Token &Name,
ExpectRParen("unexpected argument in unary expression.");
ExprHandle E = Arg.get();
switch (Kind) {
- case eMacroKind_Nz:
- return Builder->Eq(Builder->Constant(0, E->getWidth()), E);
case eMacroKind_Neg:
return Builder->Sub(Builder->Constant(0, E->getWidth()), E);
case Expr::Not: