From 7a9d49fd2bfac00e905b361ba76d26ab5b6c3b09 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Tue, 11 Dec 2007 21:27:55 +0000 Subject: Mega-patch: ripped SourceManager out of Diagnostic/DiagnosticClient. Now SourceManager is passed by reference, allowing the SourceManager to be associated with a specific translation unit, and not the entire execution of the driver. Modified all users of Diagnostics to comply with this new interface. Integrated SourceManager as a member variable of TargetInfo. TargetInfo will eventually be associated with a single translation unit (just like SourceManager). Made the SourceManager reference in ASTContext private. Provided accessor getSourceManager() for clients to use instead. Modified clients to comply with new interface. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44878 91177308-0d34-0410-b5e6-96231b3b80d8 --- CodeGen/CodeGenModule.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'CodeGen/CodeGenModule.cpp') diff --git a/CodeGen/CodeGenModule.cpp b/CodeGen/CodeGenModule.cpp index bd4df467f6..cc8ecd585b 100644 --- a/CodeGen/CodeGenModule.cpp +++ b/CodeGen/CodeGenModule.cpp @@ -40,7 +40,8 @@ void CodeGenModule::WarnUnsupported(const Stmt *S, const char *Type) { "cannot codegen this %0 yet"); SourceRange Range = S->getSourceRange(); std::string Msg = Type; - getDiags().Report(S->getLocStart(), DiagID, &Msg, 1, &Range, 1); + getDiags().Report(S->getLocStart(), DiagID, Context.getSourceManager(), + &Msg, 1, &Range, 1); } /// ReplaceMapValuesWith - This is a really slow and bad function that -- cgit v1.2.3-18-g5258