Index: src/common/dwarf_cu_to_module.cc |
=================================================================== |
--- src/common/dwarf_cu_to_module.cc (revision 1413) |
+++ src/common/dwarf_cu_to_module.cc (working copy) |
@@ -528,18 +528,19 @@ |
// functions that were never used), but all the ones we're |
// interested in cover a non-empty range of bytes. |
if (low_pc_ < high_pc_) { |
- // Create a Module::Function based on the data we've gathered, and |
- // add it to the functions_ list. |
- scoped_ptr<Module::Function> func(new Module::Function); |
// Malformed DWARF may omit the name, but all Module::Functions must |
// have names. |
+ string name; |
if (!name_.empty()) { |
- func->name = name_; |
+ name = name_; |
} else { |
cu_context_->reporter->UnnamedFunction(offset_); |
- func->name = "<name omitted>"; |
+ name = "<name omitted>"; |
} |
- func->address = low_pc_; |
+ |
+ // Create a Module::Function based on the data we've gathered, and |
+ // add it to the functions_ list. |
+ scoped_ptr<Module::Function> func(new Module::Function(name, low_pc_)); |
func->size = high_pc_ - low_pc_; |
func->parameter_size = 0; |
if (func->address) { |