]> granicus.if.org Git - llvm/commit
Support: Remove needless allocation when getMainExecutable() calls readlink()
authorNico Weber <nicolasweber@gmx.de>
Wed, 7 Aug 2019 17:00:19 +0000 (17:00 +0000)
committerNico Weber <nicolasweber@gmx.de>
Wed, 7 Aug 2019 17:00:19 +0000 (17:00 +0000)
commitbd17a8c045af512595fab6e255b285496128177c
tree46263bf9426fcaabedd669c2961cf6aff789d82d
parentea3fe92606a67990be7c203d6f5a4ec502248114
Support: Remove needless allocation when getMainExecutable() calls readlink()

We built a StringRef from a string literal which we then converted to a
std::string to call c_str().  Just use a pointer to the string literal
instead of a StringRef.

No behavior change.

Differential Revision: https://reviews.llvm.org/D65890

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368187 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Support/Unix/Path.inc