aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Parser/preprocessor.cpp
diff options
context:
space:
mode:
authorPeter Klausler <35819229+klausler@users.noreply.github.com>2024-02-20 14:08:37 -0800
committerGitHub <noreply@github.com>2024-02-20 14:08:37 -0800
commit5a20a208037d32d52f0c626ea3b199278ff0df0a (patch)
tree275446bc879ac814605b38830e6ac0b790c0afb0 /flang/lib/Parser/preprocessor.cpp
parent78762357d449cfcd11426c8e152302a27f2e7d4d (diff)
downloadllvm-5a20a208037d32d52f0c626ea3b199278ff0df0a.zip
llvm-5a20a208037d32d52f0c626ea3b199278ff0df0a.tar.gz
llvm-5a20a208037d32d52f0c626ea3b199278ff0df0a.tar.bz2
[flang] Resolve "possible performance problem" issue spam (#79769)
Four "issues" on GitHub report possible performance problems, likely detected by static analysis. None of them would ever make a measureable difference in compilation time, but I'm resolving them to clean up the open issues list. Fixes https://github.com/llvm/llvm-project/issues/79703, .../79705, .../79706, & .../79707.
Diffstat (limited to 'flang/lib/Parser/preprocessor.cpp')
-rw-r--r--flang/lib/Parser/preprocessor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/flang/lib/Parser/preprocessor.cpp b/flang/lib/Parser/preprocessor.cpp
index 4c2bd31..515b8f62 100644
--- a/flang/lib/Parser/preprocessor.cpp
+++ b/flang/lib/Parser/preprocessor.cpp
@@ -252,7 +252,7 @@ void Preprocessor::DefineStandardMacros() {
Define("__LINE__"s, "__LINE__"s);
}
-void Preprocessor::Define(std::string macro, std::string value) {
+void Preprocessor::Define(const std::string &macro, const std::string &value) {
definitions_.emplace(SaveTokenAsName(macro), Definition{value, allSources_});
}