projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ada16b6
)
Revert "Re-add the assert to StringRef's const char *, length constructor."
author
Zachary Turner
<zturner@google.com>
Tue, 20 Dec 2016 18:05:47 +0000
(18:05 +0000)
committer
Zachary Turner
<zturner@google.com>
Tue, 20 Dec 2016 18:05:47 +0000
(18:05 +0000)
This reverts commit r290188, which is causing internal compiler errors
on GCC 4.8
llvm-svn: 290189
llvm/include/llvm/ADT/StringRef.h
patch
|
blob
|
history
diff --git
a/llvm/include/llvm/ADT/StringRef.h
b/llvm/include/llvm/ADT/StringRef.h
index
2cea4ad
..
d80a848
100644
(file)
--- a/
llvm/include/llvm/ADT/StringRef.h
+++ b/
llvm/include/llvm/ADT/StringRef.h
@@
-85,9
+85,7
@@
namespace llvm {
/// Construct a string ref from a pointer and length.
LLVM_ATTRIBUTE_ALWAYS_INLINE
/*implicit*/ constexpr StringRef(const char *data, size_t length)
- : Data(data),
- Length((data || length == 0) ? length : (assert(0 && "Bad StringRef"),
- length)) {}
+ : Data(data), Length(length) {}
/// Construct a string ref from an std::string.
LLVM_ATTRIBUTE_ALWAYS_INLINE