introduce a new -fheinous-gnu-extensions flag that enables really
really horrible extensions that are disabled by default but that can
be accepted by -fheinous-gnu-extensions (but which always emit a 
warning when enabled).

As our first instance of this, implement PR3788/PR3794, which allows
non-lvalues in inline asms in contexts where lvalues are required. bleh.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66910 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGStmt.cpp b/lib/CodeGen/CGStmt.cpp
index fddc547..91aa885 100644
--- a/lib/CodeGen/CGStmt.cpp
+++ b/lib/CodeGen/CGStmt.cpp
@@ -730,6 +730,7 @@
     if (Ty->isSingleValueType()) {
       Arg = EmitScalarExpr(InputExpr);
     } else {
+      InputExpr = InputExpr->IgnoreParenNoopCasts(getContext());
       LValue Dest = EmitLValue(InputExpr);
 
       uint64_t Size = CGM.getTargetData().getTypeSizeInBits(Ty);
@@ -744,6 +745,7 @@
       }
     }
   } else {
+    InputExpr = InputExpr->IgnoreParenNoopCasts(getContext());
     LValue Dest = EmitLValue(InputExpr);
     Arg = Dest.getAddress();
     ConstraintStr += '*';
@@ -799,7 +801,10 @@
     // Simplify the output constraint.
     OutputConstraint = SimplifyConstraint(OutputConstraint.c_str() + 1, Target);
     
-    LValue Dest = EmitLValue(S.getOutputExpr(i));
+    const Expr *OutExpr = S.getOutputExpr(i);
+    OutExpr = OutExpr->IgnoreParenNoopCasts(getContext());
+    
+    LValue Dest = EmitLValue(OutExpr);
     const llvm::Type *DestValueType = 
       cast<llvm::PointerType>(Dest.getAddress()->getType())->getElementType();