TargetInfo no longer includes a reference to SourceManager.
Moved all clients of Diagnostics to use FullSourceLoc instead of SourceLocation.
Added many utility methods to FullSourceLoc to provide shorthand for:
FullLoc.getManager().someMethod(FullLoc.getLocation());
instead we have:
FullLoc.someMethod();
Modified TextDiagnostics (and related classes) to use this short-hand.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44957 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/CodeGen/CodeGenModule.cpp b/CodeGen/CodeGenModule.cpp
index cc8ecd5..30e1547 100644
--- a/CodeGen/CodeGenModule.cpp
+++ b/CodeGen/CodeGenModule.cpp
@@ -40,7 +40,7 @@
"cannot codegen this %0 yet");
SourceRange Range = S->getSourceRange();
std::string Msg = Type;
- getDiags().Report(S->getLocStart(), DiagID, Context.getSourceManager(),
+ getDiags().Report(Context.getFullLoc(S->getLocStart()), DiagID,
&Msg, 1, &Range, 1);
}
@@ -559,7 +559,7 @@
if (MemCpyFn) return MemCpyFn;
llvm::Intrinsic::ID IID;
uint64_t Size; unsigned Align;
- Context.Target.getPointerInfo(Size, Align, SourceLocation());
+ Context.Target.getPointerInfo(Size, Align, FullSourceLoc());
switch (Size) {
default: assert(0 && "Unknown ptr width");
case 32: IID = llvm::Intrinsic::memcpy_i32; break;