For PR351:
* Fix implementation and documentation about LLVMGCCDIR/bytecode-libs
* Add the makeUnique method, replacement for getUniqueFilename in Support.
* Add the sys::CopyFile function, replacement for CopyFile in Support.
* Move GetLLVMConfigDir() into generic code area since its generic.

llvm-svn: 18947
diff --git a/llvm/lib/System/Path.cpp b/llvm/lib/System/Path.cpp
index d0ee1a3..1c2b00e6 100644
--- a/llvm/lib/System/Path.cpp
+++ b/llvm/lib/System/Path.cpp
@@ -23,6 +23,14 @@
 //===          independent code. 
 //===----------------------------------------------------------------------===//
 
+Path
+Path::GetLLVMConfigDir() {
+  Path result;
+  if (result.setDirectory(LLVM_ETCDIR))
+    return result;
+  return GetLLVMDefaultConfigDir();
+}
+
 LLVMFileType 
 sys::IdentifyFileType(const char*magic, unsigned length) {
   assert(magic && "Invalid magic number string");