Renamed LLVMBuildFactory.pathRelativeToBuild to LLVMBuildFactory.pathRelativeTo.
diff --git a/zorg/buildbot/builders/ClangBuilder.py b/zorg/buildbot/builders/ClangBuilder.py
index 7beb3cb..00147e2 100644
--- a/zorg/buildbot/builders/ClangBuilder.py
+++ b/zorg/buildbot/builders/ClangBuilder.py
@@ -323,7 +323,7 @@
     CmakeCommand.applyRequiredOptions(extra_cmake_args, [
         ('-DLLVM_ENABLE_PROJECTS=', ";".join(f.depends_on_projects)),
         ])
-    rel_src_dir = LLVMBuildFactory.pathRelativeToBuild(f.llvm_srcdir, stage1_build)
+    rel_src_dir = LLVMBuildFactory.pathRelativeTo(f.llvm_srcdir, stage1_build)
 
     f.addStep(ShellCommand(name='cmake stage 1',
                            command=[cmake, "-G", "Ninja", rel_src_dir,
@@ -403,7 +403,7 @@
         # backslash string escaping bugs somewhere between buildbot and cmake. The
         # env.exe helper is required to run the tests, so hopefully it's already on
         # PATH.
-        rel_src_dir = LLVMBuildFactory.pathRelativeToBuild(f.llvm_srcdir, stage2_build)
+        rel_src_dir = LLVMBuildFactory.pathRelativeTo(f.llvm_srcdir, stage2_build)
         cmake_cmd2 = [cmake, "-G", "Ninja", rel_src_dir,
                       WithProperties("-DCMAKE_C_COMPILER=%(workdir)s/"+stage1_install+"/bin/"+cc),
                       WithProperties("-DCMAKE_CXX_COMPILER=%(workdir)s/"+stage1_install+"/bin/"+cxx),
diff --git a/zorg/buildbot/builders/ClangLTOBuilder.py b/zorg/buildbot/builders/ClangLTOBuilder.py
index 5f5be96..1cd39a0 100644
--- a/zorg/buildbot/builders/ClangLTOBuilder.py
+++ b/zorg/buildbot/builders/ClangLTOBuilder.py
@@ -22,8 +22,8 @@
 
     # Directories to use on this stage.
     obj_dir = f.stage_objdirs[stage_idx]
-    src_dir = LLVMBuildFactory.pathRelativeToBuild(f.llvm_srcdir, obj_dir)
-    install_dir = LLVMBuildFactory.pathRelativeToBuild(f.stage_installdirs[stage_idx], obj_dir)
+    src_dir = LLVMBuildFactory.pathRelativeTo(f.llvm_srcdir, obj_dir)
+    install_dir = LLVMBuildFactory.pathRelativeTo(f.stage_installdirs[stage_idx], obj_dir)
 
     # This stage could use incremental build.
     # Clean stage1, only if requested.
@@ -133,8 +133,8 @@
 
     # Directories to use on this stage.
     obj_dir = f.stage_objdirs[stage_idx]
-    src_dir = LLVMBuildFactory.pathRelativeToBuild(f.llvm_srcdir, obj_dir)
-    install_dir = LLVMBuildFactory.pathRelativeToBuild(f.stage_installdirs[stage_idx], obj_dir)
+    src_dir = LLVMBuildFactory.pathRelativeTo(f.llvm_srcdir, obj_dir)
+    install_dir = LLVMBuildFactory.pathRelativeTo(f.stage_installdirs[stage_idx], obj_dir)
     staged_install = f.stage_installdirs[use_stage_idx]
 
     # Always do a clean build for the staged compiler.
diff --git a/zorg/buildbot/builders/LLDBBuilder.py b/zorg/buildbot/builders/LLDBBuilder.py
index 3850a71..c35a084 100644
--- a/zorg/buildbot/builders/LLDBBuilder.py
+++ b/zorg/buildbot/builders/LLDBBuilder.py
@@ -61,7 +61,7 @@
                 doStepIf=cleanBuildRequested
                 ))
 
-    rel_src_dir = LLVMBuildFactory.pathRelativeToBuild(f.llvm_srcdir, f.obj_dir)
+    rel_src_dir = LLVMBuildFactory.pathRelativeTo(f.llvm_srcdir, f.obj_dir)
     cmake_options = [
         "-G", "Ninja",
         "-DCMAKE_BUILD_TYPE=" + config,
diff --git a/zorg/buildbot/builders/LibcxxAndAbiBuilder.py b/zorg/buildbot/builders/LibcxxAndAbiBuilder.py
index 7dde154..fa0eebc 100644
--- a/zorg/buildbot/builders/LibcxxAndAbiBuilder.py
+++ b/zorg/buildbot/builders/LibcxxAndAbiBuilder.py
@@ -36,7 +36,7 @@
                 obj_dir=build_path,
                 **kwargs) # Pass through all the extra arguments.
 
-    rel_src_dir = LLVMBuildFactory.pathRelativeToBuild(f.llvm_srcdir, build_path)
+    rel_src_dir = LLVMBuildFactory.pathRelativeTo(f.llvm_srcdir, build_path)
 
     # Specify the max number of threads using properties so LIT doesn't use
     # all the threads on the system.
diff --git a/zorg/buildbot/builders/OpenMPBuilder.py b/zorg/buildbot/builders/OpenMPBuilder.py
index 618c1b0..f04d164 100644
--- a/zorg/buildbot/builders/OpenMPBuilder.py
+++ b/zorg/buildbot/builders/OpenMPBuilder.py
@@ -73,7 +73,7 @@
     merged_env.update({
         'PATH': WithProperties('%(workdir)s/' + llvm_builddir + '/bin:${PATH}')})
 
-    src_dir = LLVMBuildFactory.pathRelativeToBuild(f.llvm_srcdir, f.obj_dir)
+    src_dir = LLVMBuildFactory.pathRelativeTo(f.llvm_srcdir, f.obj_dir)
 
     f.addStep(CmakeCommand(name='configure-openmp',
                            description=['configure','openmp'],
diff --git a/zorg/buildbot/builders/UnifiedTreeBuilder.py b/zorg/buildbot/builders/UnifiedTreeBuilder.py
index b16b519..e378055 100644
--- a/zorg/buildbot/builders/UnifiedTreeBuilder.py
+++ b/zorg/buildbot/builders/UnifiedTreeBuilder.py
@@ -103,7 +103,7 @@
         ])
 
     if install_dir:
-        install_dir_rel = LLVMBuildFactory.pathRelativeToBuild(
+        install_dir_rel = LLVMBuildFactory.pathRelativeTo(
                               install_dir,
                               obj_dir)
         CmakeCommand.applyRequiredOptions(cmake_args, [
@@ -134,7 +134,7 @@
         stage_name = ""
         step_name = "cmake-configure"
 
-    src_dir = LLVMBuildFactory.pathRelativeToBuild(f.llvm_srcdir, obj_dir)
+    src_dir = LLVMBuildFactory.pathRelativeTo(f.llvm_srcdir, obj_dir)
 
     f.addStep(CmakeCommand(name=step_name,
                            haltOnFailure=True,
@@ -480,8 +480,8 @@
 
         # Directories to use in this stage.
         obj_dir = f.stage_objdirs[stage_idx]
-        src_dir = LLVMBuildFactory.pathRelativeToBuild(f.llvm_srcdir, obj_dir)
-        install_dir = LLVMBuildFactory.pathRelativeToBuild(f.stage_installdirs[stage_idx], obj_dir)
+        src_dir = LLVMBuildFactory.pathRelativeTo(f.llvm_srcdir, obj_dir)
+        install_dir = LLVMBuildFactory.pathRelativeTo(f.stage_installdirs[stage_idx], obj_dir)
         staged_install = f.stage_installdirs[stage_idx - 1]
 
         # Configure the compiler to use in this stage.
diff --git a/zorg/buildbot/builders/XToolchainBuilder.py b/zorg/buildbot/builders/XToolchainBuilder.py
index 2f17570..83f5b8c 100644
--- a/zorg/buildbot/builders/XToolchainBuilder.py
+++ b/zorg/buildbot/builders/XToolchainBuilder.py
@@ -135,7 +135,7 @@
         ])
 
     if install_dir:
-        install_dir_rel = LLVMBuildFactory.pathRelativeToBuild(
+        install_dir_rel = LLVMBuildFactory.pathRelativeTo(
                               install_dir,
                               f.obj_dir)
         CmakeCommand.applyRequiredOptions(cmake_args, [
@@ -153,7 +153,7 @@
                            env=merged_env,
                            doStepIf=clean_build_requested))
 
-    src_dir_rel = LLVMBuildFactory.pathRelativeToBuild(f.llvm_srcdir, f.obj_dir)
+    src_dir_rel = LLVMBuildFactory.pathRelativeTo(f.llvm_srcdir, f.obj_dir)
 
     # Add given cmake cache at the very end.
     if cmake_cache:
diff --git a/zorg/buildbot/process/factory.py b/zorg/buildbot/process/factory.py
index feb76fe..73ba156 100644
--- a/zorg/buildbot/process/factory.py
+++ b/zorg/buildbot/process/factory.py
@@ -39,26 +39,26 @@
 
 
     @staticmethod
-    def pathRelativeToBuild(path, buildPath):
+    def pathRelativeTo(path, basePath):
         if path.startswith('/'):
             # The path is absolute. Don't touch it.
             return path
         else:
             # Remove "current dir" placeholders if any.
             path_nodes = list(filter(lambda x: x != ".", path.split('/')))
-            buildPath_nodes = list(filter(lambda x: x != ".", buildPath.split('/')))
+            basePath_nodes = list(filter(lambda x: x != ".", basePath.split('/')))
 
             # Handle edge cases.
-            if len(buildPath_nodes) == 0:
+            if len(basePath_nodes) == 0:
                 return "/".join(path_nodes)
             if len(path_nodes) == 0:
                 return "."
 
             # Skip a common part of the two paths.
-            for i in range(0, min(len(path_nodes), len(buildPath_nodes))):
-                if path_nodes[i] != buildPath_nodes[i]:
+            for i in range(0, min(len(path_nodes), len(basePath_nodes))):
+                if path_nodes[i] != basePath_nodes[i]:
                     rel_path = \
-                        "../" * (len(buildPath_nodes) - i) + \
+                        "../" * (len(basePath_nodes) - i) + \
                         "/".join(path_nodes[i:])
                     break
             else: