aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/ADT/StringRef.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/ADT/StringRef.h')
-rw-r--r--include/llvm/ADT/StringRef.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/ADT/StringRef.h b/include/llvm/ADT/StringRef.h
index 6b17eb22de..b6486e7676 100644
--- a/include/llvm/ADT/StringRef.h
+++ b/include/llvm/ADT/StringRef.h
@@ -56,7 +56,7 @@ namespace llvm {
/// Construct a string ref from an std::string.
/*implicit*/ StringRef(const std::string &Str)
- : Data(Str.c_str()), Length(Str.length()) {}
+ : Data(Str.data()), Length(Str.length()) {}
/// @}
/// @name Iterators