Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Unified Diff: common/windows/pdb_source_line_writer.cc

Issue 1318013002: Fix regression on x86 for "Fix compile error with Windows clang" (Closed)
Patch Set: use .m_str instead of static cast. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common/windows/pdb_source_line_writer.cc
diff --git a/common/windows/pdb_source_line_writer.cc b/common/windows/pdb_source_line_writer.cc
index 62285ff5f92a69a7893caa3eb48ac5a2b8f355bc..3c3401d281ec816b775645437b558c3fcbb06d39 100644
--- a/common/windows/pdb_source_line_writer.cc
+++ b/common/windows/pdb_source_line_writer.cc
@@ -277,10 +277,10 @@ bool PDBSourceLineWriter::PrintFunction(IDiaSymbol *function,
AddressRangeVector ranges;
MapAddressRange(image_map_, AddressRange(rva, static_cast<DWORD>(length)),
&ranges);
- wstring wname(name);
for (size_t i = 0; i < ranges.size(); ++i) {
fprintf(output_, "FUNC %x %x %x %ws\n",
- ranges[i].rva, ranges[i].length, stack_param_size, wname.c_str());
+ ranges[i].rva, ranges[i].length, stack_param_size,
+ name.m_str);
}
CComPtr<IDiaEnumLineNumbers> lines;
@@ -629,7 +629,6 @@ bool PDBSourceLineWriter::PrintFrameDataUsingPDB() {
}
}
- wstring wprogram_string(program_string);
for (size_t i = 0; i < frame_infos.size(); ++i) {
const FrameInfo& fi(frame_infos[i]);
fprintf(output_, "STACK WIN %x %x %x %x %x %x %x %x %x %d ",
@@ -637,7 +636,7 @@ bool PDBSourceLineWriter::PrintFrameDataUsingPDB() {
0 /* epilog_size */, parameter_size, saved_register_size,
local_size, max_stack_size, program_string_result == S_OK);
if (program_string_result == S_OK) {
- fprintf(output_, "%ws\n", wprogram_string.c_str());
+ fprintf(output_, "%ws\n", program_string.m_str);
} else {
fprintf(output_, "%d\n", allocates_base_pointer);
}
@@ -821,9 +820,9 @@ bool PDBSourceLineWriter::PrintCodePublicSymbol(IDiaSymbol *symbol) {
AddressRangeVector ranges;
MapAddressRange(image_map_, AddressRange(rva, 1), &ranges);
for (size_t i = 0; i < ranges.size(); ++i) {
- wstring wname(name);
fprintf(output_, "PUBLIC %x %x %ws\n", ranges[i].rva,
- stack_param_size > 0 ? stack_param_size : 0, wname.c_str());
+ stack_param_size > 0 ? stack_param_size : 0,
+ name.m_str);
}
return true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698