diff options
Diffstat (limited to 'include/llvm/ADT')
-rw-r--r-- | include/llvm/ADT/ArrayRef.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/llvm/ADT/ArrayRef.h b/include/llvm/ADT/ArrayRef.h index c555c1c..d4152ec 100644 --- a/include/llvm/ADT/ArrayRef.h +++ b/include/llvm/ADT/ArrayRef.h @@ -10,6 +10,7 @@ #ifndef LLVM_ADT_ARRAYREF_H #define LLVM_ADT_ARRAYREF_H +#include "llvm/ADT/None.h" #include "llvm/ADT/SmallVector.h" #include <vector> @@ -49,6 +50,9 @@ namespace llvm { /// Construct an empty ArrayRef. /*implicit*/ ArrayRef() : Data(0), Length(0) {} + /// Construct an empty ArrayRef from None. + /*implicit*/ ArrayRef(NoneType) : Data(0), Length(0) {} + /// Construct an ArrayRef from a single element. /*implicit*/ ArrayRef(const T &OneElt) : Data(&OneElt), Length(1) {} @@ -174,9 +178,12 @@ namespace llvm { public: typedef T *iterator; - /// Construct an empty ArrayRef. + /// Construct an empty MutableArrayRef. /*implicit*/ MutableArrayRef() : ArrayRef<T>() {} + /// Construct an empty MutableArrayRef from None. + /*implicit*/ MutableArrayRef(NoneType) : ArrayRef<T>() {} + /// Construct an MutableArrayRef from a single element. /*implicit*/ MutableArrayRef(T &OneElt) : ArrayRef<T>(OneElt) {} |