]> granicus.if.org Git - llvm/commit
VFS: Avoid some unnecessary std::string copies
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 23 Feb 2019 23:48:47 +0000 (23:48 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 23 Feb 2019 23:48:47 +0000 (23:48 +0000)
commit66a4d5eb1817ca24d493c08d3024a40f02206200
tree0dc5e0836896ca57e7bc83566133d61dd14ecec8
parent9ed230bd09dbdc4d85f34ac3c2b824726245f17e
VFS: Avoid some unnecessary std::string copies

Thread Twine a little deeper through the VFS to avoid unnecessarily
constructing the same std::string twice in a parameter sequence:

    Twine -> std::string -> StringRef -> std::string

Changing a few parameters from StringRef to Twine avoids the early call
to `Twine::str()`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354739 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/VirtualFileSystem.h
lib/Support/VirtualFileSystem.cpp