diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-06-20 18:28:37 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-06-20 18:28:37 +0000 |
commit | 43b7c021b3ec06c71c095475a3e8169f58f5775f (patch) | |
tree | cfd06759ed00bee53ca5b130561677c3a444a5d1 /clang/lib | |
parent | e6dcf106b2f7f3a8769eb710d7502fd7d7a350ed (diff) | |
download | bcm5719-llvm-43b7c021b3ec06c71c095475a3e8169f58f5775f.tar.gz bcm5719-llvm-43b7c021b3ec06c71c095475a3e8169f58f5775f.zip |
[ms-style asm] Change the fatal error to an extension warning. Apparently, this
error was asserting on anything that included Windows.h. MS-style inline asm is
still dropped, but at least now we're not completely silent about it.
llvm-svn: 158833
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/CodeGen/CGStmt.cpp | 3 | ||||
-rw-r--r-- | clang/lib/Sema/SemaStmt.cpp | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp index 9bb9c5c772d..1d71cddb6fc 100644 --- a/clang/lib/CodeGen/CGStmt.cpp +++ b/clang/lib/CodeGen/CGStmt.cpp @@ -1683,6 +1683,5 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) { } void CodeGenFunction::EmitMSAsmStmt(const MSAsmStmt &S) { - // Analyze the asm string to decompose it into its pieces. - llvm::report_fatal_error("MS-style asm codegen isn't yet supported."); + // MS-style inline assembly is not fully supported, so sema emits a warning. } diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp index fb828909c3d..0c9d6aa3048 100644 --- a/clang/lib/Sema/SemaStmt.cpp +++ b/clang/lib/Sema/SemaStmt.cpp @@ -2673,6 +2673,9 @@ StmtResult Sema::ActOnAsmStmt(SourceLocation AsmLoc, bool IsSimple, StmtResult Sema::ActOnMSAsmStmt(SourceLocation AsmLoc, std::string &AsmString, SourceLocation EndLoc) { + // MS-style inline assembly is not fully supported, so emit a warning. + Diag(AsmLoc, diag::warn_unsupported_msasm); + MSAsmStmt *NS = new (Context) MSAsmStmt(Context, AsmLoc, AsmString, EndLoc); |