From 7b2aaade8763ff7a356131cbdaada267d0244bfb Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Mon, 29 Sep 2014 20:27:01 +0000 Subject: [PATCH] Fixing the build for compilers which do not yet have support for constexpr functions, NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218622 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/Optional.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/llvm/ADT/Optional.h b/include/llvm/ADT/Optional.h index 144367d352d..0386e57f05f 100644 --- a/include/llvm/ADT/Optional.h +++ b/include/llvm/ADT/Optional.h @@ -120,7 +120,7 @@ public: T& operator*() LLVM_LVALUE_FUNCTION { assert(hasVal); return *getPointer(); } template - constexpr T getValueOr(U &&value) const LLVM_LVALUE_FUNCTION { + LLVM_CONSTEXPR T getValueOr(U &&value) const LLVM_LVALUE_FUNCTION { return hasValue() ? getValue() : std::forward(value); }