llvm-mc: Switch MCExpr construction to using static member functions, and taking the MCContext (which now owns all MCExprs).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80569 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/llvm-mc/AsmParser.h b/tools/llvm-mc/AsmParser.h
index 99e5bbe..c7b7316 100644
--- a/tools/llvm-mc/AsmParser.h
+++ b/tools/llvm-mc/AsmParser.h
@@ -66,7 +66,7 @@
 
   virtual bool Error(SMLoc L, const Twine &Msg);
 
-  virtual bool ParseExpression(MCExpr *&Res);
+  virtual bool ParseExpression(const MCExpr *&Res);
 
   virtual bool ParseAbsoluteExpression(int64_t &Res);
 
@@ -104,9 +104,9 @@
   /// @see ParseRelocatableExpression, ParseParenExpr.
   bool ParseParenRelocatableExpression(MCValue &Res);
 
-  bool ParsePrimaryExpr(MCExpr *&Res);
-  bool ParseBinOpRHS(unsigned Precedence, MCExpr *&Res);
-  bool ParseParenExpr(MCExpr *&Res);
+  bool ParsePrimaryExpr(const MCExpr *&Res);
+  bool ParseBinOpRHS(unsigned Precedence, const MCExpr *&Res);
+  bool ParseParenExpr(const MCExpr *&Res);
 
   /// ParseIdentifier - Parse an identifier or string (as a quoted identifier)
   /// and set \arg Res to the identifier contents.