summaryrefslogtreecommitdiff
path: root/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp
diff options
context:
space:
mode:
authorJustin Hibbits <jhibbits@FreeBSD.org>2019-12-26 23:06:28 +0000
committerJustin Hibbits <jhibbits@FreeBSD.org>2019-12-26 23:06:28 +0000
commit7b6b882fe4cfae4a65f56139e4df6cfb97f72eb2 (patch)
treef457d241f24ebb2cd3b2e346641b6284d49f6278 /contrib/llvm-project/clang/lib/AST/ExprConstant.cpp
parent6795e26b8a77d9c954dfe811e4f5d7a2e529d987 (diff)
Notes
Diffstat (limited to 'contrib/llvm-project/clang/lib/AST/ExprConstant.cpp')
-rw-r--r--contrib/llvm-project/clang/lib/AST/ExprConstant.cpp7
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);
}