aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-08-27 15:44:11 +0000
committerDan Gohman <gohman@apple.com>2010-08-27 15:44:11 +0000
commitf155dfa4e284be7dca8f1abf002476b2aaee8546 (patch)
tree87ab15f7a0c521b05e7f5834566893a90bcdca68
parent265f749edb28a80db517cc9051bd21092720d0f0 (diff)
createMainFileID doesn't need its IncludePos argument, since
the main file isn't an included file, and the IncludePos is always SourceLocation(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112269 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Basic/SourceManager.h5
-rw-r--r--lib/Frontend/CompilerInstance.cpp2
2 files changed, 3 insertions, 4 deletions
diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h
index a4aee0af38..7a66117f20 100644
--- a/include/clang/Basic/SourceManager.h
+++ b/include/clang/Basic/SourceManager.h
@@ -444,10 +444,9 @@ public:
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;
}
diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp
index 63734147be..ce0b07243b 100644
--- a/lib/Frontend/CompilerInstance.cpp
+++ b/lib/Frontend/CompilerInstance.cpp
@@ -464,7 +464,7 @@ bool CompilerInstance::InitializeSourceManager(llvm::StringRef InputFile,
// 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;