aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-config/llvm-config.cpp
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2021-10-07 11:39:01 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2021-10-08 21:16:32 -0400
commit59ae182bc248ffd7d9aa5d7b154b3feddbb74146 (patch)
tree39794d5d8532277684ce853419e04967f7ad9926 /llvm/tools/llvm-config/llvm-config.cpp
parent0f00aa502d79acf8a92b0b8490489895a9f28829 (diff)
downloadllvm-59ae182bc248ffd7d9aa5d7b154b3feddbb74146.zip
llvm-59ae182bc248ffd7d9aa5d7b154b3feddbb74146.tar.gz
llvm-59ae182bc248ffd7d9aa5d7b154b3feddbb74146.tar.bz2
Remove unnecessary StringRef convesion in llvm-config
We have a string litteral (via CPP) used to construct `StringRef`, which is used to construct a `SmallString`. Just construct the latter directly. Differential Revision: https://reviews.llvm.org/D111322
Diffstat (limited to 'llvm/tools/llvm-config/llvm-config.cpp')
-rw-r--r--llvm/tools/llvm-config/llvm-config.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/llvm-config/llvm-config.cpp b/llvm/tools/llvm-config/llvm-config.cpp
index 1a2f045..8afd359 100644
--- a/llvm/tools/llvm-config/llvm-config.cpp
+++ b/llvm/tools/llvm-config/llvm-config.cpp
@@ -358,7 +358,7 @@ int main(int argc, char **argv) {
} else {
ActivePrefix = CurrentExecPrefix;
ActiveIncludeDir = ActivePrefix + "/include";
- SmallString<256> path(StringRef(LLVM_TOOLS_INSTALL_DIR));
+ SmallString<256> path(LLVM_TOOLS_INSTALL_DIR);
sys::fs::make_absolute(ActivePrefix, path);
ActiveBinDir = std::string(path.str());
ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX;