diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-11-03 23:18:07 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-11-03 23:18:07 +0000 |
commit | 4fc82c84581476cb3adba8d4107ded22851d9c4d (patch) | |
tree | faf9fbe323d13f949f5180a7662d59e08ec9989f /lib/Driver/PlistDiagnostics.cpp | |
parent | 30c5436856b33e15387ec7a14bcd10c49236e340 (diff) |
Hook up the Plist diagnostic client to the driver.
Fix Plist output.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58652 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/PlistDiagnostics.cpp')
-rw-r--r-- | lib/Driver/PlistDiagnostics.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/Driver/PlistDiagnostics.cpp b/lib/Driver/PlistDiagnostics.cpp index fe8022c7c1..500524157e 100644 --- a/lib/Driver/PlistDiagnostics.cpp +++ b/lib/Driver/PlistDiagnostics.cpp @@ -24,6 +24,11 @@ using namespace clang; typedef llvm::DenseMap<unsigned,unsigned> FIDMap; +namespace clang { + class Preprocessor; + class PreprocessorFactory; +} + namespace { class VISIBILITY_HIDDEN PlistDiagnostics : public PathDiagnosticClient { llvm::sys::Path Directory, FilePrefix; @@ -40,7 +45,9 @@ PlistDiagnostics::PlistDiagnostics(const std::string& prefix) FilePrefix.appendComponent("report"); // All Plist files begin with "report" } -PathDiagnosticClient* clang::CreatePlistDiagnosticClient(const std::string& s) { +PathDiagnosticClient* +clang::CreatePlistDiagnosticClient(const std::string& s, + Preprocessor*, PreprocessorFactory*) { return new PlistDiagnostics(s); } @@ -118,7 +125,7 @@ static void ReportDiag(llvm::raw_ostream& o, const PathDiagnosticPiece& P, // Output the text. Indent(o, indent) << "<key>message</key>\n"; - Indent(o, indent) << "<string>" << P.getString() << "</string>"; + Indent(o, indent) << "<string>" << P.getString() << "</string>\n"; // Output the hint. Indent(o, indent) << "<key>displayhint</key>\n"; @@ -222,9 +229,9 @@ void PlistDiagnostics::HandlePathDiagnostic(const PathDiagnostic* D) { o << " </array>\n"; // Output the bug type and bug category. - o << " <key>description</key><string>" << D->getDescription() << "</string>\n" - " <key>category</key><string>" << D->getCategory() << "</string>\n"; + o << " <key>description</key>\n <string>" << D->getDescription() << "</string>\n" + " <key>category</key>\n <string>" << D->getCategory() << "</string>\n"; // Finish. - o << "</dict>\n"; + o << "</dict>\n</plist>"; } |