Fixing the build for compilers which do not yet have support for constexpr functions...
authorAaron Ballman <aaron@aaronballman.com>
Mon, 29 Sep 2014 20:27:01 +0000 (20:27 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Mon, 29 Sep 2014 20:27:01 +0000 (20:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218622 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/Optional.h

index 144367d352d546f131739ec24b9be3ac87830cf7..0386e57f05f44b8f86010e3b59dbe9102312a2b9 100644 (file)
@@ -120,7 +120,7 @@ public:
   T& operator*() LLVM_LVALUE_FUNCTION { assert(hasVal); return *getPointer(); }
 
   template <typename U>
-  constexpr T getValueOr(U &&value) const LLVM_LVALUE_FUNCTION {
+  LLVM_CONSTEXPR T getValueOr(U &&value) const LLVM_LVALUE_FUNCTION {
     return hasValue() ? getValue() : std::forward<U>(value);
   }