diff options
author | Reid Kleckner <rnk@google.com> | 2017-10-13 16:18:32 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2017-10-13 16:18:32 +0000 |
commit | e257e18b1c194b1eb7a7bc296958b5b24d08b9ae (patch) | |
tree | 0b50b9685925534ef972757059c82576abfe61ad /clang/lib/AST/StmtProfile.cpp | |
parent | c687a348705db41e709b56b8b578d6e9ee1fa75c (diff) | |
download | bcm5719-llvm-e257e18b1c194b1eb7a7bc296958b5b24d08b9ae.tar.gz bcm5719-llvm-e257e18b1c194b1eb7a7bc296958b5b24d08b9ae.zip |
Hide "#pragma optimize("", off)" from clang when it pretends to be MSVC 2017
These pragmas work around a bug in VC 1911 that isn't present in clang,
and clang warns about them.
llvm-svn: 315699
Diffstat (limited to 'clang/lib/AST/StmtProfile.cpp')
-rw-r--r-- | clang/lib/AST/StmtProfile.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/AST/StmtProfile.cpp b/clang/lib/AST/StmtProfile.cpp index 9ec92cebc1d..9acd79bc2ca 100644 --- a/clang/lib/AST/StmtProfile.cpp +++ b/clang/lib/AST/StmtProfile.cpp @@ -1418,7 +1418,7 @@ static Stmt::StmtClass DecodeOperatorCall(const CXXOperatorCallExpr *S, llvm_unreachable("Invalid overloaded operator expression"); } -#if defined(_MSC_VER) +#if defined(_MSC_VER) && !defined(__clang__) #if _MSC_VER == 1911 // Work around https://developercommunity.visualstudio.com/content/problem/84002/clang-cl-when-built-with-vc-2017-crashes-cause-vc.html // MSVC 2017 update 3 miscompiles this function, and a clang built with it @@ -1459,7 +1459,7 @@ void StmtProfiler::VisitCXXOperatorCallExpr(const CXXOperatorCallExpr *S) { ID.AddInteger(S->getOperator()); } -#if defined(_MSC_VER) +#if defined(_MSC_VER) && !defined(__clang__) #if _MSC_VER == 1911 #pragma optimize("", on) #endif |