Re-add the assert to StringRef's const char *, length constructor.
authorZachary Turner <zturner@google.com>
Tue, 20 Dec 2016 17:57:56 +0000 (17:57 +0000)
committerZachary Turner <zturner@google.com>
Tue, 20 Dec 2016 17:57:56 +0000 (17:57 +0000)
commitada16b6e905aa31c387be79ec44e17157380a051
tree3f6fa09341e4d1f2994608db35e57016808a9d90
parentd21e08ee707425750029d56266cd6a9e50e20848
Re-add the assert to StringRef's const char *, length constructor.

By putting the assert behind a conditional in the initializer list
we can ensure that it will still work in a constexpr context as
the else branch of the ternary operator won't be examined unless
the condition fails.

llvm-svn: 290188
llvm/include/llvm/ADT/StringRef.h