[lld] r233461 - ELF: Add a comment about the sysroot path.
Rui Ueyama
ruiu at google.com
Fri Mar 27 17:59:37 PDT 2015
Author: ruiu
Date: Fri Mar 27 19:59:37 2015
New Revision: 233461
URL: http://llvm.org/viewvc/llvm-project?rev=233461&view=rev
Log:
ELF: Add a comment about the sysroot path.
Modified:
lld/trunk/lib/ReaderWriter/ELF/ELFLinkingContext.cpp
Modified: lld/trunk/lib/ReaderWriter/ELF/ELFLinkingContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ELFLinkingContext.cpp?rev=233461&r1=233460&r2=233461&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ELFLinkingContext.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ELFLinkingContext.cpp Fri Mar 27 19:59:37 2015
@@ -107,11 +107,13 @@ Writer &ELFLinkingContext::writer() cons
static void buildSearchPath(SmallString<128> &path, StringRef dir,
StringRef sysRoot) {
- if (!dir.startswith("=/"))
- path.assign(dir);
- else {
+ if (dir.startswith("=/")) {
+ // If a search directory begins with "=", "=" is replaced
+ // with the sysroot path.
path.assign(sysRoot);
path.append(dir.substr(1));
+ } else {
+ path.assign(dir);
}
}
More information about the llvm-commits
mailing list