@@ -162,7 +162,7 @@ class HTMLLogger : public Logger {
162
162
llvm::raw_string_ostream JStringStream{JSON};
163
163
llvm::json::OStream JOS{JStringStream, /* Indent=*/ 2 };
164
164
165
- const ControlFlowContext *CFG ;
165
+ const ControlFlowContext *CFC ;
166
166
// Timeline of iterations of CFG block visitation.
167
167
std::vector<Iteration> Iters;
168
168
// Indexes in `Iters` of the iterations for each block.
@@ -176,15 +176,15 @@ class HTMLLogger : public Logger {
176
176
177
177
public:
178
178
explicit HTMLLogger (StreamFactory Streams) : Streams(std::move(Streams)) {}
179
- void beginAnalysis (const ControlFlowContext &CFG ,
179
+ void beginAnalysis (const ControlFlowContext &CFC ,
180
180
TypeErasedDataflowAnalysis &A) override {
181
181
OS = Streams ();
182
- this ->CFG = &CFG ;
182
+ this ->CFC = &CFC ;
183
183
*OS << llvm::StringRef (HTMLLogger_html).split (" <?INJECT?>" ).first ;
184
184
185
- BlockConverged.resize (CFG .getCFG ().getNumBlockIDs ());
185
+ BlockConverged.resize (CFC .getCFG ().getNumBlockIDs ());
186
186
187
- const auto &D = CFG .getDecl ();
187
+ const auto &D = CFC .getDecl ();
188
188
const auto &SM = A.getASTContext ().getSourceManager ();
189
189
*OS << " <title>" ;
190
190
if (const auto *ND = dyn_cast<NamedDecl>(&D))
@@ -345,15 +345,15 @@ class HTMLLogger : public Logger {
345
345
// tokens are associated with, and even which BB element (so that clicking
346
346
// can select the right element).
347
347
void writeCode () {
348
- const auto &AST = CFG ->getDecl ().getASTContext ();
348
+ const auto &AST = CFC ->getDecl ().getASTContext ();
349
349
bool Invalid = false ;
350
350
351
351
// Extract the source code from the original file.
352
352
// Pretty-printing from the AST would probably be nicer (no macros or
353
353
// indentation to worry about), but we need the boundaries of particular
354
354
// AST nodes and the printer doesn't provide this.
355
355
auto Range = clang::Lexer::makeFileCharRange (
356
- CharSourceRange::getTokenRange (CFG ->getDecl ().getSourceRange ()),
356
+ CharSourceRange::getTokenRange (CFC ->getDecl ().getSourceRange ()),
357
357
AST.getSourceManager (), AST.getLangOpts ());
358
358
if (Range.isInvalid ())
359
359
return ;
@@ -419,7 +419,7 @@ class HTMLLogger : public Logger {
419
419
// Construct one TokenInfo per character in a flat array.
420
420
// This is inefficient (chars in a token all have the same info) but simple.
421
421
std::vector<TokenInfo> State (Code.size ());
422
- for (const auto *Block : CFG ->getCFG ()) {
422
+ for (const auto *Block : CFC ->getCFG ()) {
423
423
unsigned EltIndex = 0 ;
424
424
for (const auto & Elt : *Block) {
425
425
++EltIndex;
@@ -480,7 +480,7 @@ class HTMLLogger : public Logger {
480
480
// out to `dot` to turn it into an SVG.
481
481
void writeCFG () {
482
482
*OS << " <template data-copy='cfg'>\n " ;
483
- if (auto SVG = renderSVG (buildCFGDot (CFG ->getCFG ())))
483
+ if (auto SVG = renderSVG (buildCFGDot (CFC ->getCFG ())))
484
484
*OS << *SVG;
485
485
else
486
486
*OS << " Can't draw CFG: " << toString (SVG.takeError ());
0 commit comments