[cfe-commits] r39066 - in /cfe/cfe/trunk: Lex/HeaderSearch.cpp include/clang/Basic/FileManager.h
sabre at cs.uiuc.edu
sabre at cs.uiuc.edu
Wed Jul 11 09:27:15 PDT 2007
Author: sabre
Date: Wed Jul 11 11:27:15 2007
New Revision: 39066
URL: http://llvm.org/viewvc/llvm-project?rev=39066&view=rev
Log:
Change DirectoryEntry::getName() to return a const char *
Modified:
cfe/cfe/trunk/Lex/HeaderSearch.cpp
cfe/cfe/trunk/include/clang/Basic/FileManager.h
Modified: cfe/cfe/trunk/Lex/HeaderSearch.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Lex/HeaderSearch.cpp?rev=39066&r1=39065&r2=39066&view=diff
==============================================================================
--- cfe/cfe/trunk/Lex/HeaderSearch.cpp (original)
+++ cfe/cfe/trunk/Lex/HeaderSearch.cpp Wed Jul 11 11:27:15 2007
@@ -130,8 +130,8 @@
if (CurFileEnt && !isAngled && !NoCurDirSearch) {
// Concatenate the requested file onto the directory.
// FIXME: Portability. Filename concatenation should be in sys::Path.
- if (const FileEntry *FE =
- FileMgr.getFile(CurFileEnt->getDir()->getName()+"/"+Filename)) {
+ std::string Name = CurFileEnt->getDir()->getName();
+ if (const FileEntry *FE = FileMgr.getFile(Name+"/"+Filename)) {
// Leave CurDir unset.
// This file is a system header or C++ unfriendly if the old file is.
@@ -158,7 +158,8 @@
const FileEntry *FE = 0;
if (!SearchDirs[i].isFramework()) {
// FIXME: Portability. Adding file to dir should be in sys::Path.
- FE = FileMgr.getFile(SearchDirs[i].getDir()->getName()+"/"+Filename);
+ std::string Name = SearchDirs[i].getDir()->getName();
+ FE = FileMgr.getFile(Name+"/"+Filename);
} else {
FE = DoFrameworkLookup(SearchDirs[i].getDir(), Filename);
}
Modified: cfe/cfe/trunk/include/clang/Basic/FileManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/include/clang/Basic/FileManager.h?rev=39066&r1=39065&r2=39066&view=diff
==============================================================================
--- cfe/cfe/trunk/include/clang/Basic/FileManager.h (original)
+++ cfe/cfe/trunk/include/clang/Basic/FileManager.h Wed Jul 11 11:27:15 2007
@@ -30,7 +30,7 @@
DirectoryEntry() {}
friend class FileManager;
public:
- const std::string &getName() const { return Name; }
+ const char *getName() const { return Name.c_str(); }
};
/// FileEntry - Cached information about one file on the disk.
More information about the cfe-commits
mailing list