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

Side by Side Diff: tools/gn/ninja_target_writer.cc

Issue 2105553005: tools/gn: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « tools/gn/ninja_build_writer.cc ('k') | tools/gn/ninja_toolchain_writer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "tools/gn/ninja_target_writer.h" 5 #include "tools/gn/ninja_target_writer.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 out_ << " "; 248 out_ << " ";
249 path_output_.WriteFile(out_, *source); 249 path_output_.WriteFile(out_, *source);
250 } 250 }
251 251
252 // Target input deps. Sort by label so the output is deterministic (otherwise 252 // Target input deps. Sort by label so the output is deterministic (otherwise
253 // some of the targets will have gone through std::sets which will have 253 // some of the targets will have gone through std::sets which will have
254 // sorted them by pointer). 254 // sorted them by pointer).
255 std::sort( 255 std::sort(
256 input_deps_targets.begin(), input_deps_targets.end(), 256 input_deps_targets.begin(), input_deps_targets.end(),
257 [](const Target* a, const Target* b) { return a->label() < b->label(); }); 257 [](const Target* a, const Target* b) { return a->label() < b->label(); });
258 for (const auto& dep : input_deps_targets) { 258 for (auto* dep : input_deps_targets) {
259 DCHECK(!dep->dependency_output_file().value().empty()); 259 DCHECK(!dep->dependency_output_file().value().empty());
260 out_ << " "; 260 out_ << " ";
261 path_output_.WriteFile(out_, dep->dependency_output_file()); 261 path_output_.WriteFile(out_, dep->dependency_output_file());
262 } 262 }
263 263
264 out_ << "\n"; 264 out_ << "\n";
265 return input_stamp_file; 265 return input_stamp_file;
266 } 266 }
267 267
268 void NinjaTargetWriter::WriteStampForTarget( 268 void NinjaTargetWriter::WriteStampForTarget(
(...skipping 15 matching lines...) Expand all
284 << GetNinjaRulePrefixForToolchain(settings_) 284 << GetNinjaRulePrefixForToolchain(settings_)
285 << Toolchain::ToolTypeToName(Toolchain::TYPE_STAMP); 285 << Toolchain::ToolTypeToName(Toolchain::TYPE_STAMP);
286 path_output_.WriteFiles(out_, files); 286 path_output_.WriteFiles(out_, files);
287 287
288 if (!order_only_deps.empty()) { 288 if (!order_only_deps.empty()) {
289 out_ << " ||"; 289 out_ << " ||";
290 path_output_.WriteFiles(out_, order_only_deps); 290 path_output_.WriteFiles(out_, order_only_deps);
291 } 291 }
292 out_ << std::endl; 292 out_ << std::endl;
293 } 293 }
OLDNEW
« no previous file with comments | « tools/gn/ninja_build_writer.cc ('k') | tools/gn/ninja_toolchain_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698