This revision was automatically updated to reflect the committed changes.
Closed by commit rGfb9413cb84cc: Remove some SVN-specific code. (authored by 
thakis).
Herald added a project: clang.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72848/new/

https://reviews.llvm.org/D72848

Files:
  clang/lib/Basic/Version.cpp


Index: clang/lib/Basic/Version.cpp
===================================================================
--- clang/lib/Basic/Version.cpp
+++ clang/lib/Basic/Version.cpp
@@ -28,46 +28,19 @@
   return CLANG_REPOSITORY_STRING;
 #else
 #ifdef CLANG_REPOSITORY
-  StringRef URL(CLANG_REPOSITORY);
+  return CLANG_REPOSITORY;
 #else
-  StringRef URL("");
+  return "";
 #endif
-
-  // If the CLANG_REPOSITORY is empty, try to use the SVN keyword. This helps 
us
-  // pick up a tag in an SVN export, for example.
-  StringRef SVNRepository("$URL$");
-  if (URL.empty()) {
-    URL = SVNRepository.slice(SVNRepository.find(':'),
-                              SVNRepository.find("/lib/Basic"));
-  }
-
-  // Strip off version from a build from an integration branch.
-  URL = URL.slice(0, URL.find("/src/tools/clang"));
-
-  // Trim path prefix off, assuming path came from standard cfe path.
-  size_t Start = URL.find("cfe/");
-  if (Start != StringRef::npos)
-    URL = URL.substr(Start + 4);
-
-  return URL;
 #endif
 }
 
 std::string getLLVMRepositoryPath() {
 #ifdef LLVM_REPOSITORY
-  StringRef URL(LLVM_REPOSITORY);
+  return LLVM_REPOSITORY;
 #else
-  StringRef URL("");
+  return "";
 #endif
-
-  // Trim path prefix off, assuming path came from standard llvm path.
-  // Leave "llvm/" prefix to distinguish the following llvm revision from the
-  // clang revision.
-  size_t Start = URL.find("llvm/");
-  if (Start != StringRef::npos)
-    URL = URL.substr(Start);
-
-  return URL;
 }
 
 std::string getClangRevision() {


Index: clang/lib/Basic/Version.cpp
===================================================================
--- clang/lib/Basic/Version.cpp
+++ clang/lib/Basic/Version.cpp
@@ -28,46 +28,19 @@
   return CLANG_REPOSITORY_STRING;
 #else
 #ifdef CLANG_REPOSITORY
-  StringRef URL(CLANG_REPOSITORY);
+  return CLANG_REPOSITORY;
 #else
-  StringRef URL("");
+  return "";
 #endif
-
-  // If the CLANG_REPOSITORY is empty, try to use the SVN keyword. This helps us
-  // pick up a tag in an SVN export, for example.
-  StringRef SVNRepository("$URL$");
-  if (URL.empty()) {
-    URL = SVNRepository.slice(SVNRepository.find(':'),
-                              SVNRepository.find("/lib/Basic"));
-  }
-
-  // Strip off version from a build from an integration branch.
-  URL = URL.slice(0, URL.find("/src/tools/clang"));
-
-  // Trim path prefix off, assuming path came from standard cfe path.
-  size_t Start = URL.find("cfe/");
-  if (Start != StringRef::npos)
-    URL = URL.substr(Start + 4);
-
-  return URL;
 #endif
 }
 
 std::string getLLVMRepositoryPath() {
 #ifdef LLVM_REPOSITORY
-  StringRef URL(LLVM_REPOSITORY);
+  return LLVM_REPOSITORY;
 #else
-  StringRef URL("");
+  return "";
 #endif
-
-  // Trim path prefix off, assuming path came from standard llvm path.
-  // Leave "llvm/" prefix to distinguish the following llvm revision from the
-  // clang revision.
-  size_t Start = URL.find("llvm/");
-  if (Start != StringRef::npos)
-    URL = URL.substr(Start);
-
-  return URL;
 }
 
 std::string getClangRevision() {
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to