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

Side by Side Diff: tools/gn/ninja_build_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_binary_target_writer.cc ('k') | tools/gn/ninja_target_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_build_writer.h" 5 #include "tools/gn/ninja_build_writer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <fstream> 9 #include <fstream>
10 #include <map> 10 #include <map>
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 235
236 for (const Pool* pool : all_pools_) { 236 for (const Pool* pool : all_pools_) {
237 std::string pool_name = pool->GetNinjaName(default_toolchain_->label()); 237 std::string pool_name = pool->GetNinjaName(default_toolchain_->label());
238 out_ << "pool " << pool_name << std::endl 238 out_ << "pool " << pool_name << std::endl
239 << " depth = " << pool->depth() << std::endl 239 << " depth = " << pool->depth() << std::endl
240 << std::endl; 240 << std::endl;
241 } 241 }
242 } 242 }
243 243
244 void NinjaBuildWriter::WriteSubninjas() { 244 void NinjaBuildWriter::WriteSubninjas() {
245 for (const auto& elem : all_settings_) { 245 for (auto* elem : all_settings_) {
246 out_ << "subninja "; 246 out_ << "subninja ";
247 path_output_.WriteFile(out_, GetNinjaFileForToolchain(elem)); 247 path_output_.WriteFile(out_, GetNinjaFileForToolchain(elem));
248 out_ << std::endl; 248 out_ << std::endl;
249 } 249 }
250 out_ << std::endl; 250 out_ << std::endl;
251 } 251 }
252 252
253 bool NinjaBuildWriter::WritePhonyAndAllRules(Err* err) { 253 bool NinjaBuildWriter::WritePhonyAndAllRules(Err* err) {
254 // Track rules as we generate them so we don't accidentally write a phony 254 // Track rules as we generate them so we don't accidentally write a phony
255 // rule that collides with something else. 255 // rule that collides with something else.
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 EscapeOptions ninja_escape; 414 EscapeOptions ninja_escape;
415 ninja_escape.mode = ESCAPE_NINJA; 415 ninja_escape.mode = ESCAPE_NINJA;
416 416
417 // Escape for special chars Ninja will handle. 417 // Escape for special chars Ninja will handle.
418 std::string escaped = EscapeString(phony_name, ninja_escape, nullptr); 418 std::string escaped = EscapeString(phony_name, ninja_escape, nullptr);
419 419
420 out_ << "build " << escaped << ": phony "; 420 out_ << "build " << escaped << ": phony ";
421 path_output_.WriteFile(out_, target->dependency_output_file()); 421 path_output_.WriteFile(out_, target->dependency_output_file());
422 out_ << std::endl; 422 out_ << std::endl;
423 } 423 }
OLDNEW
« no previous file with comments | « tools/gn/ninja_binary_target_writer.cc ('k') | tools/gn/ninja_target_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698