Basic: import SmallString<> into clang namespace

(I was going to fix the TODO about DenseMap too, but
that would break self-host right now. See PR11922.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149799 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Lex/HeaderSearch.cpp b/lib/Lex/HeaderSearch.cpp
index e3a6c52..39b49a3 100644
--- a/lib/Lex/HeaderSearch.cpp
+++ b/lib/Lex/HeaderSearch.cpp
@@ -110,7 +110,7 @@
     return std::string();
 
 
-  llvm::SmallString<256> Result(ModuleCachePath);
+  SmallString<256> Result(ModuleCachePath);
   llvm::sys::path::append(Result, Module->getTopLevelModule()->Name + ".pcm");
   return Result.str().str();
 }
@@ -121,7 +121,7 @@
     return std::string();
   
   
-  llvm::SmallString<256> Result(ModuleCachePath);
+  SmallString<256> Result(ModuleCachePath);
   llvm::sys::path::append(Result, ModuleName + ".pcm");
   return Result.str().str();
 }
@@ -137,7 +137,7 @@
   for (unsigned Idx = 0, N = SearchDirs.size(); Idx != N; ++Idx) {
     if (SearchDirs[Idx].isFramework()) {
       // Search for or infer a module map for a framework.
-      llvm::SmallString<128> FrameworkDirName;
+      SmallString<128> FrameworkDirName;
       FrameworkDirName += SearchDirs[Idx].getFrameworkDir()->getName();
       llvm::sys::path::append(FrameworkDirName, ModuleName + ".framework");
       if (const DirectoryEntry *FrameworkDir 
@@ -167,7 +167,7 @@
               
     // Search for a module map in a subdirectory with the same name as the
     // module.
-    llvm::SmallString<128> NestedModuleMapDirName;
+    SmallString<128> NestedModuleMapDirName;
     NestedModuleMapDirName = SearchDirs[Idx].getDir()->getName();
     llvm::sys::path::append(NestedModuleMapDirName, ModuleName);
     if (loadModuleMapFile(NestedModuleMapDirName) == LMM_NewlyLoaded) {
@@ -205,7 +205,7 @@
     SmallVectorImpl<char> *SearchPath,
     SmallVectorImpl<char> *RelativePath,
     Module **SuggestedModule) const {
-  llvm::SmallString<1024> TmpDir;
+  SmallString<1024> TmpDir;
   if (isNormalDir()) {
     // Concatenate the requested file onto the directory.
     TmpDir = getDir()->getName();
@@ -286,7 +286,7 @@
   // Otherwise, construct the path to this framework dir.
 
   // FrameworkName = "/System/Library/Frameworks/"
-  llvm::SmallString<1024> FrameworkName;
+  SmallString<1024> FrameworkName;
   FrameworkName += getFrameworkDir()->getName();
   if (FrameworkName.empty() || FrameworkName.back() != '/')
     FrameworkName.push_back('/');
@@ -418,7 +418,7 @@
   // a subsequent include of "baz.h" should resolve to "whatever/foo/baz.h".
   // This search is not done for <> headers.
   if (CurFileEnt && !isAngled && !NoCurDirSearch) {
-    llvm::SmallString<1024> TmpDir;
+    SmallString<1024> TmpDir;
     // Concatenate the requested file onto the directory.
     // FIXME: Portability.  Filename concatenation should be in sys::Path.
     TmpDir += CurFileEnt->getDir()->getName();
@@ -512,7 +512,7 @@
   if (CurFileEnt && !isAngled && Filename.find('/') == StringRef::npos) {
     HeaderFileInfo &IncludingHFI = getFileInfo(CurFileEnt);
     if (IncludingHFI.IndexHeaderMapHeader) {
-      llvm::SmallString<128> ScratchFilename;
+      SmallString<128> ScratchFilename;
       ScratchFilename += IncludingHFI.Framework;
       ScratchFilename += '/';
       ScratchFilename += Filename;
@@ -562,7 +562,7 @@
        FrameworkPos[DotFrameworkLen] != '\\'))
     return 0;
 
-  llvm::SmallString<1024> FrameworkName(ContextName,
+  SmallString<1024> FrameworkName(ContextName,
                                         FrameworkPos+DotFrameworkLen+1);
 
   // Append Frameworks/HIToolbox.framework/
@@ -601,7 +601,7 @@
   }
 
   // Check ".../Frameworks/HIToolbox.framework/Headers/HIToolbox.h"
-  llvm::SmallString<1024> HeadersFilename(FrameworkName);
+  SmallString<1024> HeadersFilename(FrameworkName);
   HeadersFilename += "Headers/";
   if (SearchPath != NULL) {
     SearchPath->clear();
@@ -647,7 +647,7 @@
   // it has no file entry. For now, workaround this by using an
   // absolute path if we find the file here, and otherwise letting
   // header search handle it.
-  llvm::SmallString<128> Path(File);
+  SmallString<128> Path(File);
   llvm::sys::fs::make_absolute(Path);
   bool exists;
   if (llvm::sys::fs::exists(Path.str(), exists) || !exists)
@@ -831,7 +831,7 @@
   if (!Result && llvm::sys::path::filename(File->getName()) == "module.map") {
     // If the file we loaded was a module.map, look for the corresponding
     // module_private.map.
-    llvm::SmallString<128> PrivateFilename(Dir->getName());
+    SmallString<128> PrivateFilename(Dir->getName());
     llvm::sys::path::append(PrivateFilename, "module_private.map");
     if (const FileEntry *PrivateFile = FileMgr.getFile(PrivateFilename))
       Result = ModMap.parseModuleMapFile(PrivateFile);
@@ -922,7 +922,7 @@
   if (KnownDir != DirectoryHasModuleMap.end())
     return KnownDir->second? LMM_AlreadyLoaded : LMM_InvalidModuleMap;
   
-  llvm::SmallString<128> ModuleMapFileName;
+  SmallString<128> ModuleMapFileName;
   ModuleMapFileName += Dir->getName();
   unsigned ModuleMapDirNameLen = ModuleMapFileName.size();
   llvm::sys::path::append(ModuleMapFileName, "module.map");
@@ -965,7 +965,7 @@
   for (unsigned Idx = 0, N = SearchDirs.size(); Idx != N; ++Idx) {
     if (SearchDirs[Idx].isFramework()) {
       llvm::error_code EC;
-      llvm::SmallString<128> DirNative;
+      SmallString<128> DirNative;
       llvm::sys::path::native(SearchDirs[Idx].getFrameworkDir()->getName(),
                               DirNative);
       
@@ -997,7 +997,7 @@
     // Try to load module map files for immediate subdirectories of this search
     // directory.
     llvm::error_code EC;
-    llvm::SmallString<128> DirNative;
+    SmallString<128> DirNative;
     llvm::sys::path::native(SearchDirs[Idx].getDir()->getName(), DirNative);
     for (llvm::sys::fs::directory_iterator Dir(DirNative.str(), EC), DirEnd;
          Dir != DirEnd && !EC; Dir.increment(EC)) {