[libcxx-commits] [PATCH] D59999: Allow the compiler to optimize `string == "literal string"`.
Samuel Benzaquen via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Apr 29 07:31:12 PDT 2019
sbenza updated this revision to Diff 197107.
sbenza added a comment.
Use `inline` to solve the problem instead of changing the implemetation.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59999/new/
https://reviews.llvm.org/D59999
Files:
libcxx/include/string
Index: libcxx/include/string
===================================================================
--- libcxx/include/string
+++ libcxx/include/string
@@ -3709,6 +3709,7 @@
}
template <class _CharT, class _Traits, class _Allocator>
+inline
int
basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1,
size_type __n1,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59999.197107.patch
Type: text/x-patch
Size: 385 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190429/02eaf2d2/attachment.bin>
More information about the libcxx-commits
mailing list