forked from OSchip/llvm-project
PlistSupport.h: avoid gcc 'defined but not used' warning
llvm-svn: 212396
This commit is contained in:
parent
1a86ad21d1
commit
452bfcf00c
|
@ -19,12 +19,6 @@ namespace clang {
|
||||||
namespace markup {
|
namespace markup {
|
||||||
typedef llvm::DenseMap<FileID, unsigned> FIDMap;
|
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,
|
static inline void AddFID(FIDMap &FIDs, SmallVectorImpl<FileID> &V,
|
||||||
const SourceManager &SM, SourceLocation L) {
|
const SourceManager &SM, SourceLocation L) {
|
||||||
FileID FID = SM.getFileID(SM.getExpansionLoc(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;
|
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) {
|
static inline raw_ostream &EmitInteger(raw_ostream &o, int64_t value) {
|
||||||
o << "<integer>";
|
o << "<integer>";
|
||||||
o << value;
|
o << value;
|
||||||
|
|
|
@ -63,8 +63,7 @@ void arcmt::writeARCDiagsToPlist(const std::string &outPath,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write the plist header.
|
EmitPlistHeader(o);
|
||||||
o << PlistHeader;
|
|
||||||
|
|
||||||
// Write the root object: a <dict> containing...
|
// Write the root object: a <dict> containing...
|
||||||
// - "files", an <array> mapping from FIDs to file names
|
// - "files", an <array> mapping from FIDs to file names
|
||||||
|
|
|
@ -345,8 +345,7 @@ void PlistDiagnostics::FlushDiagnosticsImpl(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write the plist header.
|
EmitPlistHeader(o);
|
||||||
o << PlistHeader;
|
|
||||||
|
|
||||||
// Write the root object: a <dict> containing...
|
// Write the root object: a <dict> containing...
|
||||||
// - "clang_version", the string representation of clang version
|
// - "clang_version", the string representation of clang version
|
||||||
|
|
Loading…
Reference in New Issue