diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-03-16 00:35:39 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-03-16 00:35:39 +0000 |
commit | 36c35ba0aca641e60e5dbee8efbc620c08b9bd61 (patch) | |
tree | cadd5c4b1bbe39cc1d5e07b4f1940a3d2431a31e /lib/Frontend | |
parent | f715ca12bfc9fddfde75f98a197424434428b821 (diff) |
Use SourceManager's Diagnostic object for all file-reading errors,
simplifying the SourceManager interfaces somewhat.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98598 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend')
-rw-r--r-- | lib/Frontend/CacheTokens.cpp | 2 | ||||
-rw-r--r-- | lib/Frontend/PCHWriter.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/Frontend/CacheTokens.cpp b/lib/Frontend/CacheTokens.cpp index 3d7f5c0e85..02d6cec8fc 100644 --- a/lib/Frontend/CacheTokens.cpp +++ b/lib/Frontend/CacheTokens.cpp @@ -474,7 +474,7 @@ void PTHWriter::GeneratePTH(const std::string &MainFile) { if (!P.isAbsolute()) continue; - const llvm::MemoryBuffer *B = C.getBuffer(); + const llvm::MemoryBuffer *B = C.getBuffer(PP.getDiagnostics()); if (!B) continue; FileID FID = SM.createFileID(FE, SourceLocation(), SrcMgr::C_User); diff --git a/lib/Frontend/PCHWriter.cpp b/lib/Frontend/PCHWriter.cpp index ba406c83af..c256b4103a 100644 --- a/lib/Frontend/PCHWriter.cpp +++ b/lib/Frontend/PCHWriter.cpp @@ -1089,7 +1089,8 @@ void PCHWriter::WriteSourceManagerBlock(SourceManager &SourceMgr, // We add one to the size so that we capture the trailing NULL // that is required by llvm::MemoryBuffer::getMemBuffer (on // the reader side). - const llvm::MemoryBuffer *Buffer = Content->getBuffer(); + const llvm::MemoryBuffer *Buffer + = Content->getBuffer(PP.getDiagnostics()); const char *Name = Buffer->getBufferIdentifier(); Stream.EmitRecordWithBlob(SLocBufferAbbrv, Record, llvm::StringRef(Name, strlen(Name) + 1)); |