[cfe-commits] r112269 - in /cfe/trunk: include/clang/Basic/SourceManager.h lib/Frontend/CompilerInstance.cpp
Dan Gohman
gohman at apple.com
Fri Aug 27 08:44:11 PDT 2010
Author: djg
Date: Fri Aug 27 10:44:11 2010
New Revision: 112269
URL: http://llvm.org/viewvc/llvm-project?rev=112269&view=rev
Log:
createMainFileID doesn't need its IncludePos argument, since
the main file isn't an included file, and the IncludePos is
always SourceLocation().
Modified:
cfe/trunk/include/clang/Basic/SourceManager.h
cfe/trunk/lib/Frontend/CompilerInstance.cpp
Modified: cfe/trunk/include/clang/Basic/SourceManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/SourceManager.h?rev=112269&r1=112268&r2=112269&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/SourceManager.h (original)
+++ cfe/trunk/include/clang/Basic/SourceManager.h Fri Aug 27 10:44:11 2010
@@ -444,10 +444,9 @@
FileID getMainFileID() const { return MainFileID; }
/// createMainFileID - Create the FileID for the main source file.
- FileID createMainFileID(const FileEntry *SourceFile,
- SourceLocation IncludePos) {
+ FileID createMainFileID(const FileEntry *SourceFile) {
assert(MainFileID.isInvalid() && "MainFileID already set!");
- MainFileID = createFileID(SourceFile, IncludePos, SrcMgr::C_User);
+ MainFileID = createFileID(SourceFile, SourceLocation(), SrcMgr::C_User);
return MainFileID;
}
Modified: cfe/trunk/lib/Frontend/CompilerInstance.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInstance.cpp?rev=112269&r1=112268&r2=112269&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInstance.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInstance.cpp Fri Aug 27 10:44:11 2010
@@ -464,7 +464,7 @@
// Figure out where to get and map in the main file.
if (InputFile != "-") {
const FileEntry *File = FileMgr.getFile(InputFile);
- if (File) SourceMgr.createMainFileID(File, SourceLocation());
+ if (File) SourceMgr.createMainFileID(File);
if (SourceMgr.getMainFileID().isInvalid()) {
Diags.Report(diag::err_fe_error_reading) << InputFile;
return false;
More information about the cfe-commits
mailing list