forked from OSchip/llvm-project
parent
ba2c65277a
commit
5ac3b0be2d
|
@ -502,19 +502,13 @@ void HTMLDiagnostics::HandlePiece(Rewriter& R, FileID BugFileID,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void EmitAlphaCounter(llvm::raw_ostream& os, unsigned n) {
|
static void EmitAlphaCounter(llvm::raw_ostream& os, unsigned n) {
|
||||||
llvm::SmallString<10> buf;
|
unsigned x = n % ('z' - 'a');
|
||||||
|
n /= 'z' - 'a';
|
||||||
|
|
||||||
do {
|
if (n > 0)
|
||||||
unsigned x = n % ('z' - 'a');
|
EmitAlphaCounter(os, n);
|
||||||
buf.push_back('a' + x);
|
|
||||||
n = n / ('z' - 'a');
|
|
||||||
} while (n);
|
|
||||||
|
|
||||||
assert(!buf.empty());
|
os << char('a' + x);
|
||||||
|
|
||||||
for (llvm::SmallVectorImpl<char>::reverse_iterator I=buf.rbegin(),
|
|
||||||
E=buf.rend(); I!=E; ++I)
|
|
||||||
os << *I;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned HTMLDiagnostics::ProcessMacroPiece(llvm::raw_ostream& os,
|
unsigned HTMLDiagnostics::ProcessMacroPiece(llvm::raw_ostream& os,
|
||||||
|
|
Loading…
Reference in New Issue