aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Parse/Parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Parse/Parser.cpp')
-rw-r--r--clang/lib/Parse/Parser.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp
index 3b56102..81adbfb 100644
--- a/clang/lib/Parse/Parser.cpp
+++ b/clang/lib/Parse/Parser.cpp
@@ -1253,6 +1253,10 @@ ExprResult Parser::ParseSimpleAsm(SourceLocation *EndLoc) {
assert(Tok.is(tok::kw_asm) && "Not an asm!");
SourceLocation Loc = ConsumeToken();
+ // Check if GNU-styple InlineAsm is disabled.
+ if (!getLangOpts().GNUAsm)
+ Diag(Loc, diag::err_gnu_inline_asm_disabled);
+
if (Tok.is(tok::kw_volatile)) {
// Remove from the end of 'asm' to the end of 'volatile'.
SourceRange RemovalRange(PP.getLocForEndOfToken(Loc),