diff options
| author | 2017-01-24 08:32:59 +0000 | |
|---|---|---|
| committer | 2017-01-24 08:32:59 +0000 | |
| commit | 53d771aafdbe5b919f264f53cba3788e2c4cffd2 (patch) | |
| tree | 7eca39498be0ff1e3a6daf583cd9ca5886bb2636 /gnu/llvm/lib/Transforms/Utils/GlobalStatus.cpp | |
| parent | In preparation of compiling our kernels with -ffreestanding, explicitly map (diff) | |
| download | wireguard-openbsd-53d771aafdbe5b919f264f53cba3788e2c4cffd2.tar.xz wireguard-openbsd-53d771aafdbe5b919f264f53cba3788e2c4cffd2.zip | |
Import LLVM 4.0.0 rc1 including clang and lld to help the current
development effort on OpenBSD/arm64.
Diffstat (limited to 'gnu/llvm/lib/Transforms/Utils/GlobalStatus.cpp')
| -rw-r--r-- | gnu/llvm/lib/Transforms/Utils/GlobalStatus.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gnu/llvm/lib/Transforms/Utils/GlobalStatus.cpp b/gnu/llvm/lib/Transforms/Utils/GlobalStatus.cpp index 266be41fbea..74ebcda8355 100644 --- a/gnu/llvm/lib/Transforms/Utils/GlobalStatus.cpp +++ b/gnu/llvm/lib/Transforms/Utils/GlobalStatus.cpp @@ -20,9 +20,8 @@ using namespace llvm; /// and release, then return AcquireRelease. /// static AtomicOrdering strongerOrdering(AtomicOrdering X, AtomicOrdering Y) { - if (X == AtomicOrdering::Acquire && Y == AtomicOrdering::Release) - return AtomicOrdering::AcquireRelease; - if (Y == AtomicOrdering::Acquire && X == AtomicOrdering::Release) + if ((X == AtomicOrdering::Acquire && Y == AtomicOrdering::Release) || + (Y == AtomicOrdering::Acquire && X == AtomicOrdering::Release)) return AtomicOrdering::AcquireRelease; return (AtomicOrdering)std::max((unsigned)X, (unsigned)Y); } @@ -35,7 +34,7 @@ bool llvm::isSafeToDestroyConstant(const Constant *C) { if (isa<GlobalValue>(C)) return false; - if (isa<ConstantInt>(C) || isa<ConstantFP>(C)) + if (isa<ConstantData>(C)) return false; for (const User *U : C->users()) |
