give ASTContext a SourceMgr reference, add diagnostic hooks to SemaBase.

Swift SVN r39
This commit is contained in:
Chris Lattner
2010-07-19 05:13:55 +00:00
parent c5e54442b4
commit 2eeee5faca
6 changed files with 26 additions and 7 deletions

View File

@@ -27,9 +27,9 @@ using llvm::SMLoc;
// Setup and Helper Methods
//===----------------------------------------------------------------------===//
Parser::Parser(unsigned BufferID, llvm::SourceMgr &SM, ASTContext &Context)
: SourceMgr(SM),
L(*new Lexer(BufferID, SM)),
Parser::Parser(unsigned BufferID, ASTContext &Context)
: SourceMgr(Context.SourceMgr),
L(*new Lexer(BufferID, SourceMgr)),
S(*new Sema(Context)) {
}