]> granicus.if.org Git - clang/commitdiff
Use StringRef's case transformation methods.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sun, 6 Nov 2011 20:36:48 +0000 (20:36 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sun, 6 Nov 2011 20:36:48 +0000 (20:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143889 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/FileManager.cpp
utils/TableGen/ClangDiagnosticsEmitter.cpp

index c1f715ed05924e66a7fd2251156085ce57090011..69e65bc38ad7bec64b04f52f4875834d897e4817 100644 (file)
@@ -20,7 +20,6 @@
 #include "clang/Basic/FileManager.h"
 #include "clang/Basic/FileSystemStatCache.h"
 #include "llvm/ADT/SmallString.h"
-#include "llvm/ADT/StringExtras.h"
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/raw_ostream.h"
@@ -106,8 +105,8 @@ public:
   FileEntry &getFile(const char *Name, const struct stat & /*StatBuf*/) {
     std::string FullPath(GetFullPath(Name));
 
-    // LowercaseString because Windows filesystem is case insensitive.
-    FullPath = llvm::LowercaseString(FullPath);
+    // Lowercase string because Windows filesystem is case insensitive.
+    FullPath = StringRef(FullPath).lower();
     return UniqueFiles.GetOrCreateValue(FullPath).getValue();
   }
 
index da2fb70b4a573f2bb31e2aede4c511950676e17c..7a5eb1d7114b471e43c34bfc8813ad447982d54d 100644 (file)
@@ -16,7 +16,6 @@
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/Compiler.h"
 #include "llvm/ADT/DenseSet.h"
-#include "llvm/ADT/StringExtras.h"
 #include "llvm/ADT/StringMap.h"
 #include "llvm/ADT/SmallString.h"
 #include "llvm/ADT/VectorExtras.h"
@@ -130,7 +129,7 @@ namespace {
 void ClangDiagsDefsEmitter::run(raw_ostream &OS) {
   // Write the #if guard
   if (!Component.empty()) {
-    std::string ComponentName = UppercaseString(Component);
+    std::string ComponentName = StringRef(Component).upper();
     OS << "#ifdef " << ComponentName << "START\n";
     OS << "__" << ComponentName << "START = DIAG_START_" << ComponentName
        << ",\n";