[llvm] r218622 - Fixing the build for compilers which do not yet have support for constexpr functions, NFC.

Aaron Ballman aaron at aaronballman.com
Mon Sep 29 13:27:01 PDT 2014


Author: aaronballman
Date: Mon Sep 29 15:27:01 2014
New Revision: 218622

URL: http://llvm.org/viewvc/llvm-project?rev=218622&view=rev
Log:
Fixing the build for compilers which do not yet have support for constexpr functions, NFC.

Modified:
    llvm/trunk/include/llvm/ADT/Optional.h

Modified: llvm/trunk/include/llvm/ADT/Optional.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/Optional.h?rev=218622&r1=218621&r2=218622&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/Optional.h (original)
+++ llvm/trunk/include/llvm/ADT/Optional.h Mon Sep 29 15:27:01 2014
@@ -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);
   }
 





More information about the llvm-commits mailing list