PlistSupport.h: avoid gcc 'defined but not used' warning

llvm-svn: 212396
This commit is contained in:
Alp Toker 2014-07-06 07:59:14 +00:00
parent 1a86ad21d1
commit 452bfcf00c
3 changed files with 11 additions and 10 deletions

View File

@ -19,12 +19,6 @@ namespace clang {
namespace markup {
typedef llvm::DenseMap<FileID, unsigned> FIDMap;
static const char *PlistHeader =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" "
"\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n"
"<plist version=\"1.0\">\n";
static inline void AddFID(FIDMap &FIDs, SmallVectorImpl<FileID> &V,
const SourceManager &SM, SourceLocation L) {
FileID FID = SM.getFileID(SM.getExpansionLoc(L));
@ -49,6 +43,15 @@ static inline raw_ostream &Indent(raw_ostream &o, const unsigned indent) {
return o;
}
static inline raw_ostream &EmitPlistHeader(raw_ostream &o) {
static const char *PlistHeader =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" "
"\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n"
"<plist version=\"1.0\">\n";
return o << PlistHeader;
}
static inline raw_ostream &EmitInteger(raw_ostream &o, int64_t value) {
o << "<integer>";
o << value;

View File

@ -63,8 +63,7 @@ void arcmt::writeARCDiagsToPlist(const std::string &outPath,
return;
}
// Write the plist header.
o << PlistHeader;
EmitPlistHeader(o);
// Write the root object: a <dict> containing...
// - "files", an <array> mapping from FIDs to file names

View File

@ -345,8 +345,7 @@ void PlistDiagnostics::FlushDiagnosticsImpl(
return;
}
// Write the plist header.
o << PlistHeader;
EmitPlistHeader(o);
// Write the root object: a <dict> containing...
// - "clang_version", the string representation of clang version