mirror of
https://github.com/intel/llvm.git
synced 2026-02-03 10:39:35 +08:00
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. llvm-svn: 44878
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user