Allow "bc" as suffix for bytecode files.

llvm-svn: 16381
diff --git a/llvm/lib/System/Unix/Path.cpp b/llvm/lib/System/Unix/Path.cpp
index 329bf37..182a0bb 100644
--- a/llvm/lib/System/Unix/Path.cpp
+++ b/llvm/lib/System/Unix/Path.cpp
@@ -52,6 +52,8 @@
       return true;
     else if (path.elide_suffix() && path.append_suffix("o") && path.readable())
       return true;
+    else if (path.elide_suffix() && path.append_suffix("bc") && path.readable())
+      return true;
   } else if (path.elide_file() && path.append_file(basename)) {
     if (path.append_suffix(Path::GetDLLSuffix()) && path.readable())
       return true;
@@ -59,6 +61,8 @@
       return true;
     else if (path.elide_suffix() && path.append_suffix("o") && path.readable())
       return true;
+    else if (path.elide_suffix() && path.append_suffix("bc") && path.readable())
+      return true;
   }
   path.clear();
   return false;
@@ -76,6 +80,10 @@
       return result;
   }
 
+  // Try the LLVM lib directory in the LLVM install area
+  if (result.set_directory(LLVM_LIBDIR) && IsLibrary(result,basename))
+    return result;
+
   // Try /usr/lib
   if (result.set_directory("/usr/lib/") && IsLibrary(result,basename))
     return result;