aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land.
This looks reasonable to me, but you should wait a few days to commit in case someone more into CodeGen has comments. Your choice on updating the code you factored into a function; those changes are just style nits. ================ Comment at: lib/CodeGen/CodeGenModule.cpp:1258 + std::vector<std::string> Features; + const FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(D); + FD = FD ? FD->getMostRecentDecl() : FD; ---------------- Could use `const auto *` here. ================ Comment at: lib/CodeGen/CodeGenModule.cpp:1266-1268 + for (llvm::StringMap<bool>::const_iterator it = FeatureMap.begin(), + ie = FeatureMap.end(); + it != ie; ++it) ---------------- Could switch this to a range-base for loop? ================ Comment at: lib/CodeGen/CodeGenModule.cpp:1275 + // the function. + const auto *TD = FD->getAttr<TargetAttr>(); + TargetAttr::ParsedTargetAttr ParsedAttr = TD->parse(); ---------------- Could hoist this out of the `if` statement so we don't do a has/get operation. Repository: rC Clang https://reviews.llvm.org/D43095 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits