[PATCH] D58035: [clang/DIVar] Emit flag for params that have unchanged values
Adrian Prantl via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 15 20:38:45 PDT 2019
aprantl added inline comments.
================
Comment at: lib/CodeGen/CGDebugInfo.cpp:4537
+ CGM.getLangOpts().Optimize) {
+ for (auto &SP : DeclCache) {
+ auto *D = SP.first;
----------------
Just looking at the type declarations in CGDebugInfo.h: Why not iterate over the `SPCache` directly? Shouldn't that contain all Function declarations only?
================
Comment at: lib/CodeGen/CGDebugInfo.cpp:4541
+ const Stmt *FuncBody = (*FD).getBody();
+ for(auto Parm : FD->parameters()) {
+ ExprMutationAnalyzer FuncAnalyzer(*FuncBody, CGM.getContext());
----------------
clang-format please
================
Comment at: lib/CodeGen/CGDebugInfo.cpp:4546
+ if (I != ParmCache.end()) {
+ auto *DIParm = dyn_cast<llvm::DILocalVariable>(I->second);
+ DIParm->setIsNotModified();
----------------
Could this be a `cast<>`?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58035/new/
https://reviews.llvm.org/D58035
More information about the cfe-commits
mailing list