Change the diagnostics interface to take an array of pointers to
strings instead of array of strings. This reduces string copying
in some not-very-important cases, but paves the way for future
improvements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59494 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/DeclSpec.cpp b/lib/Parse/DeclSpec.cpp
index e800761..733c37c 100644
--- a/lib/Parse/DeclSpec.cpp
+++ b/lib/Parse/DeclSpec.cpp
@@ -311,6 +311,7 @@
}
void DeclSpec::Diag(Diagnostic &D, SourceLocation Loc, SourceManager& SrcMgr,
- unsigned DiagID, const std::string &info) {
- D.Report(FullSourceLoc(Loc,SrcMgr), DiagID, &info, 1);
+ unsigned DiagID, const std::string &Info) {
+ const std::string *Strs[] = { &Info };
+ D.Report(FullSourceLoc(Loc,SrcMgr), DiagID, Strs, 1);
}