[cfe-commits] r143889 - in /cfe/trunk: lib/Basic/FileManager.cpp utils/TableGen/ClangDiagnosticsEmitter.cpp
Benjamin Kramer
benny.kra at googlemail.com
Sun Nov 6 12:36:49 PST 2011
Author: d0k
Date: Sun Nov 6 14:36:48 2011
New Revision: 143889
URL: http://llvm.org/viewvc/llvm-project?rev=143889&view=rev
Log:
Use StringRef's case transformation methods.
Modified:
cfe/trunk/lib/Basic/FileManager.cpp
cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp
Modified: cfe/trunk/lib/Basic/FileManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/FileManager.cpp?rev=143889&r1=143888&r2=143889&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/FileManager.cpp (original)
+++ cfe/trunk/lib/Basic/FileManager.cpp Sun Nov 6 14:36:48 2011
@@ -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 @@
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();
}
Modified: cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp?rev=143889&r1=143888&r2=143889&view=diff
==============================================================================
--- cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp (original)
+++ cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp Sun Nov 6 14:36:48 2011
@@ -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 @@
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";
More information about the cfe-commits
mailing list