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)
commite7b9464943e1a1c590c238008b4b30fd2a376b10
treeae3c61a15341eea62d3c8b1b66eb3c86f1ff258c
parentdc185522fbdec75490cacfaa15966c4a2a7505d2
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()`.

llvm-svn: 354739
llvm/include/llvm/Support/VirtualFileSystem.h
llvm/lib/Support/VirtualFileSystem.cpp