Remove many superfluous SmallString::str() calls.
authorYaron Keren <yaron.keren@gmail.com>
Wed, 18 Mar 2015 10:17:07 +0000 (10:17 +0000)
committerYaron Keren <yaron.keren@gmail.com>
Wed, 18 Mar 2015 10:17:07 +0000 (10:17 +0000)
commit92e1b62d45aa5a3cbd67eaf5903165d7d8efeada
tree1444da86136cbaaadf6bf12dd03c51eda0f728a3
parent4a7baeab14a9f991752879bdc85ad4bf684cdf46
Remove many superfluous SmallString::str() calls.

Now that SmallString is a first-class citizen, most SmallString::str()
calls are not required. This patch removes a whole bunch of them, yet
there are lots more.

There are two use cases where str() is really needed:
1) To use one of StringRef member functions which is not available in
SmallString.
2) To convert to std::string, as StringRef implicitly converts while
SmallString do not. We may wish to change this, but it may introduce
ambiguity.

llvm-svn: 232622
44 files changed:
clang/lib/Basic/FileManager.cpp
clang/lib/Basic/VirtualFileSystem.cpp
clang/lib/Driver/CrossWindowsToolChain.cpp
clang/lib/Driver/Driver.cpp
clang/lib/Driver/MSVCToolChain.cpp
clang/lib/Driver/Multilib.cpp
clang/lib/Driver/ToolChains.cpp
clang/lib/Driver/Tools.cpp
clang/lib/Edit/EditedSource.cpp
clang/lib/Frontend/ASTUnit.cpp
clang/lib/Frontend/CompilerInstance.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/lib/Frontend/FrontendAction.cpp
clang/lib/Frontend/FrontendActions.cpp
clang/lib/Frontend/InitHeaderSearch.cpp
clang/lib/Frontend/ModuleDependencyCollector.cpp
clang/lib/Frontend/SerializedDiagnosticPrinter.cpp
clang/lib/Lex/HeaderSearch.cpp
clang/lib/Lex/ModuleMap.cpp
clang/lib/Lex/PPDirectives.cpp
clang/lib/Lex/PPMacroExpansion.cpp
clang/lib/Lex/Pragma.cpp
clang/lib/Lex/TokenLexer.cpp
clang/lib/Parse/ParseInit.cpp
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaExpr.cpp
clang/lib/Sema/SemaStmt.cpp
clang/lib/Serialization/ASTReaderStmt.cpp
clang/lib/Serialization/ASTWriter.cpp
clang/lib/Serialization/GlobalModuleIndex.cpp
clang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp
clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp
clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
clang/lib/Tooling/JSONCompilationDatabase.cpp
clang/utils/TableGen/ClangDiagnosticsEmitter.cpp
llvm/include/llvm/Support/FileUtilities.h
llvm/lib/MC/MCAsmStreamer.cpp
llvm/lib/MC/MCAssembler.cpp
llvm/lib/MC/MCDwarf.cpp
llvm/lib/Support/APInt.cpp
llvm/lib/Support/LockFileManager.cpp
llvm/lib/Support/Triple.cpp
llvm/lib/Support/Windows/Path.inc
llvm/utils/TableGen/FixedLenDecoderEmitter.cpp