Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- virtual bool VisitFunctionDecl(FunctionDecl *func) {
- errs() << "Inside " << ++numFunctions << " " << func->getNameInfo().getName().getAsString() << "\n";
- // FIXME: This detects CFGBlocks in given source file
- // correctly, but does not give correct liveness values
- clang::AnalysisDeclContextManager *ADCM = new clang::AnalysisDeclContextManager(false, true, true, true, true, true);
- clang::AnalysisDeclContext *func_ADC = ADCM->getContext(func);
- clang::LiveVariables *func_LV = clang::LiveVariables::computeLiveness(*func_ADC, false);
- clang::LiveVariables::Observer *obs = new clang::LiveVariables::Observer();
- func_LV->runOnAllBlocks(*obs);
- func_LV->dumpBlockLiveness((func_ADC->getASTContext()).getSourceManager());
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement