[PATCH] D34063: [ThinLTO] YAML traits for module summaries
Mehdi AMINI via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 20 11:25:05 PDT 2017
mehdi_amini added inline comments.
================
Comment at: include/llvm/IR/ModuleSummaryIndexYAML.h:420
+ if(M.Mod) {
+ for(Module::global_object_iterator i = M.Mod->global_object_begin(); i != M.Mod->global_object_end(); i++) {
+ NameMap.insert(std::make_pair(i->getGUID(), i->getName()));
----------------
tejohnson wrote:
> Needs clang format. I believe you will also need to iterate over the aliases doing the same thing (global objects only includes functions and globalvars).
There is a helper for this: `Module::global_values()`
(also: prefer for-range loops, and variable name needs to be uppercase).
https://reviews.llvm.org/D34063
More information about the llvm-commits
mailing list