summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseStmtAsm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Parse/ParseStmtAsm.cpp')
-rw-r--r--clang/lib/Parse/ParseStmtAsm.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Parse/ParseStmtAsm.cpp b/clang/lib/Parse/ParseStmtAsm.cpp
index 7bf4da6d1bd..9523ec33432 100644
--- a/clang/lib/Parse/ParseStmtAsm.cpp
+++ b/clang/lib/Parse/ParseStmtAsm.cpp
@@ -615,6 +615,11 @@ StmtResult Parser::ParseAsmStatement(bool &msAsm) {
msAsm = true;
return ParseMicrosoftAsmStatement(AsmLoc);
}
+
+ // Check if GNU-style inline Asm is disabled.
+ if (!getLangOpts().GNUAsm)
+ Diag(AsmLoc, diag::err_gnu_inline_asm_disabled);
+
DeclSpec DS(AttrFactory);
SourceLocation Loc = Tok.getLocation();
ParseTypeQualifierListOpt(DS, AR_VendorAttributesParsed);
OpenPOWER on IntegriCloud