[PATCH] Adding SmallString support to Twine
Yaron Keren
yaron.keren at gmail.com
Sun Mar 15 22:54:32 PDT 2015
Implemented Paweł suggestion to use isSingleStringRef() to reduce the number of overloads. GetOrCreateSymbol, CopyString and MakeArgString accept only Twine now, virtual MakeArgString(StringRef) is still required and was renamed to MakeArgStringRef to avoid ambiguity with the Twine version.
isSingleStringRef() is used through the toStringRef(), which was inlined to give the compiler a chance at optimizing out the Twine construction-isSingleStringRef testing-getSingleStringRef code sequence for simple arguments.
Removed function names from Twine.h comments.
http://reviews.llvm.org/D6372
Files:
include/llvm/ADT/Twine.h
include/llvm/MC/MCContext.h
include/llvm/Option/ArgList.h
lib/MC/MCContext.cpp
lib/Option/ArgList.cpp
lib/Support/Twine.cpp
tools/clang/include/clang/Sema/CodeCompleteConsumer.h
tools/clang/lib/Sema/CodeCompleteConsumer.cpp
unittests/ADT/TwineTest.cpp
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6372.22010.patch
Type: text/x-patch
Size: 17670 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150316/0e102e63/attachment.bin>
More information about the llvm-commits
mailing list