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/Driver/clang.cpp b/Driver/clang.cpp
index 171e4ec..b33f344 100644
--- a/Driver/clang.cpp
+++ b/Driver/clang.cpp
@@ -480,6 +480,11 @@
llvm::cl::ZeroOrMore);
static llvm::cl::opt<bool>
+EnableHeinousExtensions("fheinous-gnu-extensions",
+ llvm::cl::desc("enable GNU extensions that you really really shouldn't use"),
+ llvm::cl::ValueDisallowed, llvm::cl::Hidden);
+
+static llvm::cl::opt<bool>
ObjCNonFragileABI("fobjc-nonfragile-abi",
llvm::cl::desc("enable objective-c's nonfragile abi"));
@@ -647,6 +652,8 @@
if (Freestanding)
Options.Freestanding = 1;
+ if (EnableHeinousExtensions)
+ Options.HeinousExtensions = 1;
Options.MathErrno = MathErrno;