r316301 - Create fewer copies of StringMaps. No functionality change intended.
Benjamin Kramer via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 22 13:16:28 PDT 2017
Author: d0k
Date: Sun Oct 22 13:16:28 2017
New Revision: 316301
URL: http://llvm.org/viewvc/llvm-project?rev=316301&view=rev
Log:
Create fewer copies of StringMaps. No functionality change intended.
Modified:
cfe/trunk/lib/Frontend/PrecompiledPreamble.cpp
cfe/trunk/lib/Parse/ParseStmtAsm.cpp
Modified: cfe/trunk/lib/Frontend/PrecompiledPreamble.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PrecompiledPreamble.cpp?rev=316301&r1=316300&r2=316301&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/PrecompiledPreamble.cpp (original)
+++ cfe/trunk/lib/Frontend/PrecompiledPreamble.cpp Sun Oct 22 13:16:28 2017
@@ -445,7 +445,7 @@ PrecompiledPreamble::PrecompiledPreamble
TempPCHFile PCHFile, std::vector<char> PreambleBytes,
bool PreambleEndsAtStartOfLine,
llvm::StringMap<PreambleFileHash> FilesInPreamble)
- : PCHFile(std::move(PCHFile)), FilesInPreamble(FilesInPreamble),
+ : PCHFile(std::move(PCHFile)), FilesInPreamble(std::move(FilesInPreamble)),
PreambleBytes(std::move(PreambleBytes)),
PreambleEndsAtStartOfLine(PreambleEndsAtStartOfLine) {}
Modified: cfe/trunk/lib/Parse/ParseStmtAsm.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseStmtAsm.cpp?rev=316301&r1=316300&r2=316301&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseStmtAsm.cpp (original)
+++ cfe/trunk/lib/Parse/ParseStmtAsm.cpp Sun Oct 22 13:16:28 2017
@@ -558,7 +558,7 @@ StmtResult Parser::ParseMicrosoftAsmStat
if (buildMSAsmString(PP, AsmLoc, AsmToks, TokOffsets, AsmString))
return StmtError();
- TargetOptions TO = Actions.Context.getTargetInfo().getTargetOpts();
+ const TargetOptions &TO = Actions.Context.getTargetInfo().getTargetOpts();
std::string FeaturesStr =
llvm::join(TO.Features.begin(), TO.Features.end(), ",");
More information about the cfe-commits
mailing list