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

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

Issue 1544333002: Convert Pass()→std::move() in //tools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/builder_record.h ('k') | tools/gn/functions.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 <algorithm> 5 #include <algorithm>
6 #include <limits> 6 #include <limits>
7 #include <utility>
7 8
8 #include "tools/gn/err.h" 9 #include "tools/gn/err.h"
9 #include "tools/gn/functions.h" 10 #include "tools/gn/functions.h"
10 #include "tools/gn/parse_tree.h" 11 #include "tools/gn/parse_tree.h"
11 #include "tools/gn/scheduler.h" 12 #include "tools/gn/scheduler.h"
12 #include "tools/gn/scope.h" 13 #include "tools/gn/scope.h"
13 #include "tools/gn/settings.h" 14 #include "tools/gn/settings.h"
14 #include "tools/gn/tool.h" 15 #include "tools/gn/tool.h"
15 #include "tools/gn/toolchain.h" 16 #include "tools/gn/toolchain.h"
16 #include "tools/gn/value_extractors.h" 17 #include "tools/gn/value_extractors.h"
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 (tool->link_output().empty() && !tool->depend_output().empty())) { 886 (tool->link_output().empty() && !tool->depend_output().empty())) {
886 *err = Err(function, "Both link_output and depend_output should either " 887 *err = Err(function, "Both link_output and depend_output should either "
887 "be specified or they should both be empty."); 888 "be specified or they should both be empty.");
888 return Value(); 889 return Value();
889 } 890 }
890 891
891 // Make sure there weren't any vars set in this tool that were unused. 892 // Make sure there weren't any vars set in this tool that were unused.
892 if (!block_scope.CheckForUnusedVars(err)) 893 if (!block_scope.CheckForUnusedVars(err))
893 return Value(); 894 return Value();
894 895
895 toolchain->SetTool(tool_type, tool.Pass()); 896 toolchain->SetTool(tool_type, std::move(tool));
896 return Value(); 897 return Value();
897 } 898 }
898 899
899 // toolchain_args -------------------------------------------------------------- 900 // toolchain_args --------------------------------------------------------------
900 901
901 extern const char kToolchainArgs[] = "toolchain_args"; 902 extern const char kToolchainArgs[] = "toolchain_args";
902 extern const char kToolchainArgs_HelpShort[] = 903 extern const char kToolchainArgs_HelpShort[] =
903 "toolchain_args: Set build arguments for toolchain build setup."; 904 "toolchain_args: Set build arguments for toolchain build setup.";
904 extern const char kToolchainArgs_Help[] = 905 extern const char kToolchainArgs_Help[] =
905 "toolchain_args: Set build arguments for toolchain build setup.\n" 906 "toolchain_args: Set build arguments for toolchain build setup.\n"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 return Value(); 967 return Value();
967 968
968 Scope::KeyValueMap values; 969 Scope::KeyValueMap values;
969 block_scope.GetCurrentScopeValues(&values); 970 block_scope.GetCurrentScopeValues(&values);
970 toolchain->args() = values; 971 toolchain->args() = values;
971 972
972 return Value(); 973 return Value();
973 } 974 }
974 975
975 } // namespace functions 976 } // namespace functions
OLDNEW
« no previous file with comments | « tools/gn/builder_record.h ('k') | tools/gn/functions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698