diff options
Diffstat (limited to 'contrib/llvm-project/clang/lib/AST/ExprConstant.cpp')
-rw-r--r-- | contrib/llvm-project/clang/lib/AST/ExprConstant.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp b/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp index 26163c6143e6..e4d4c8885ac9 100644 --- a/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp +++ b/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp @@ -9896,6 +9896,13 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, } } + // Avoid emiting call for runtime decision on PowerPC 32-bit + // The lock free possibilities on this platform are covered by the lines + // above and we know in advance other cases require lock + if (Info.Ctx.getTargetInfo().getTriple().getArch() == llvm::Triple::ppc) { + return Success(0, E); + } + return BuiltinOp == Builtin::BI__atomic_always_lock_free ? Success(0, E) : Error(E); } |