[clang-tools-extra] r231440 - Renamed function to avoid confusion about purpose.
John Thompson
John.Thompson.JTSoftware at gmail.com
Thu Mar 5 16:39:42 PST 2015
Author: jtsoftware
Date: Thu Mar 5 18:39:42 2015
New Revision: 231440
URL: http://llvm.org/viewvc/llvm-project?rev=231440&view=rev
Log:
Renamed function to avoid confusion about purpose.
Modified:
clang-tools-extra/trunk/modularize/ModularizeUtilities.cpp
Modified: clang-tools-extra/trunk/modularize/ModularizeUtilities.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/modularize/ModularizeUtilities.cpp?rev=231440&r1=231439&r2=231440&view=diff
==============================================================================
--- clang-tools-extra/trunk/modularize/ModularizeUtilities.cpp (original)
+++ clang-tools-extra/trunk/modularize/ModularizeUtilities.cpp Thu Mar 5 18:39:42 2015
@@ -341,8 +341,10 @@ bool ModularizeUtilities::collectUmbrell
}
return true;
}
-
-std::string normalize(StringRef Path) {
+
+// Replace .. embedded in path for purposes of having
+// a canonical path.
+std::string replaceDotDot(StringRef Path) {
SmallString<128> Buffer;
llvm::sys::path::const_iterator B = llvm::sys::path::begin(Path),
E = llvm::sys::path::end(Path);
@@ -365,7 +367,7 @@ std::string normalize(StringRef Path) {
// \param FilePath The file path, relative to the module map directory.
// \returns The file path in canonical form.
std::string ModularizeUtilities::getCanonicalPath(StringRef FilePath) {
- std::string Tmp(normalize(FilePath));
+ std::string Tmp(replaceDotDot(FilePath));
std::replace(Tmp.begin(), Tmp.end(), '\\', '/');
StringRef Tmp2(Tmp);
if (Tmp2.startswith("./"))
More information about the cfe-commits
mailing list