diff --git a/tools/llvm-mc/AsmParser.cpp b/tools/llvm-mc/AsmParser.cpp
index dbceb6b..a782561 100644
--- a/tools/llvm-mc/AsmParser.cpp
+++ b/tools/llvm-mc/AsmParser.cpp
@@ -21,7 +21,6 @@
 #include "llvm/MC/MCSectionMachO.h"
 #include "llvm/MC/MCStreamer.h"
 #include "llvm/MC/MCSymbol.h"
-#include "llvm/MC/MCValue.h"
 #include "llvm/Support/SourceMgr.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Target/TargetAsmParser.h"
@@ -712,15 +711,11 @@
   // FIXME: Use better location, we should use proper tokens.
   SMLoc EqualLoc = Lexer.getLoc();
 
-  MCValue Value;
-  const MCExpr *Expr;
+  const MCExpr *Value;
   SMLoc StartLoc = Lexer.getLoc();
-  if (ParseExpression(Expr))
+  if (ParseExpression(Value))
     return true;
   
-  if (!Expr->EvaluateAsRelocatable(Ctx, Value))
-    return Error(StartLoc, "expected relocatable expression");
-
   if (Lexer.isNot(AsmToken::EndOfStatement))
     return TokError("unexpected token in assignment");
 
@@ -937,15 +932,11 @@
 bool AsmParser::ParseDirectiveValue(unsigned Size) {
   if (Lexer.isNot(AsmToken::EndOfStatement)) {
     for (;;) {
-      MCValue Value;
-      const MCExpr *Expr;
+      const MCExpr *Value;
       SMLoc StartLoc = Lexer.getLoc();
-      if (ParseExpression(Expr))
+      if (ParseExpression(Value))
         return true;
 
-      if (!Expr->EvaluateAsRelocatable(Ctx, Value))
-        return Error(StartLoc, "expected relocatable expression");
-
       Out.EmitValue(Value, Size);
 
       if (Lexer.is(AsmToken::EndOfStatement))
@@ -992,7 +983,7 @@
 
   // FIXME: Sometimes the fill expr is 'nop' if it isn't supplied, instead of 0.
   for (uint64_t i = 0, e = NumBytes; i != e; ++i)
-    Out.EmitValue(MCValue::get(FillExpr), 1);
+    Out.EmitValue(MCConstantExpr::Create(FillExpr, getContext()), 1);
 
   return false;
 }
@@ -1029,7 +1020,7 @@
     return TokError("invalid '.fill' size, expected 1, 2, 4, or 8");
 
   for (uint64_t i = 0, e = NumValues; i != e; ++i)
-    Out.EmitValue(MCValue::get(FillExpr), FillSize);
+    Out.EmitValue(MCConstantExpr::Create(FillExpr, getContext()), FillSize);
 
   return false;
 }
@@ -1037,15 +1028,11 @@
 /// ParseDirectiveOrg
 ///  ::= .org expression [ , expression ]
 bool AsmParser::ParseDirectiveOrg() {
-  MCValue Offset;
-  const MCExpr *Expr;
+  const MCExpr *Offset;
   SMLoc StartLoc = Lexer.getLoc();
-  if (ParseExpression(Expr))
+  if (ParseExpression(Offset))
     return true;
 
-  if (!Expr->EvaluateAsRelocatable(Ctx, Offset))
-    return Error(StartLoc, "expected relocatable expression");
-
   // Parse optional fill expression.
   int64_t FillExpr = 0;
   if (Lexer.isNot(AsmToken::EndOfStatement)) {
@@ -1417,15 +1404,11 @@
     return TokError("unexpected token in '.lsym' directive");
   Lexer.Lex();
 
-  MCValue Value;
-  const MCExpr *Expr;
+  const MCExpr *Value;
   SMLoc StartLoc = Lexer.getLoc();
-  if (ParseExpression(Expr))
+  if (ParseExpression(Value))
     return true;
 
-  if (!Expr->EvaluateAsRelocatable(Ctx, Value))
-    return Error(StartLoc, "expected relocatable expression");
-
   if (Lexer.isNot(AsmToken::EndOfStatement))
     return TokError("unexpected token in '.lsym' directive");
   
