Chromium Code Reviews

Side by Side Diff: src/IceCompiler.cpp

Issue 1132883003: Change a build-attribute REQUIRES check to use supported not requested. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « no previous file | tests_lit/llvm2ice_tests/addr-opt-multi-def-var.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceCompiler.cpp - Driver for bitcode translation -------===// 1 //===- subzero/src/IceCompiler.cpp - Driver for bitcode translation -------===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // This file defines a driver for translating PNaCl bitcode into native code. 10 // This file defines a driver for translating PNaCl bitcode into native code.
(...skipping 30 matching lines...)
41 {"llvm_cl", ALLOW_LLVM_CL}, 41 {"llvm_cl", ALLOW_LLVM_CL},
42 {"llvm_ir", ALLOW_LLVM_IR}, 42 {"llvm_ir", ALLOW_LLVM_IR},
43 {"llvm_ir_as_input", ALLOW_LLVM_IR_AS_INPUT}, 43 {"llvm_ir_as_input", ALLOW_LLVM_IR_AS_INPUT},
44 {"minimal_build", ALLOW_MINIMAL_BUILD}, 44 {"minimal_build", ALLOW_MINIMAL_BUILD},
45 {"browser_mode", PNACL_BROWSER_TRANSLATOR}}; 45 {"browser_mode", PNACL_BROWSER_TRANSLATOR}};
46 46
47 // Validates values of build attributes. Prints them to Stream if 47 // Validates values of build attributes. Prints them to Stream if
48 // Stream is non-null. 48 // Stream is non-null.
49 void ValidateAndGenerateBuildAttributes(const ClFlags &Flags, Ostream *Stream) { 49 void ValidateAndGenerateBuildAttributes(const ClFlags &Flags, Ostream *Stream) {
50 if (Stream) { 50 if (Stream) {
51 // List the requested target.
52 *Stream << Flags.getTargetArch() << "\n";
53
54 // List the supported targets. 51 // List the supported targets.
Jim Stichnoth 2015/05/15 23:21:50 This comment's indentation is weird (but was also
jvoung (off chromium) 2015/05/15 23:50:30 Hmm, clang-format seems to force the comment to st
Jim Stichnoth 2015/05/15 23:52:06 No problem either way, just want to avoid the "nex
55 #define SUBZERO_TARGET(TARGET) *Stream << "target_" #TARGET << "\n"; 52 #define SUBZERO_TARGET(TARGET) *Stream << "target_" #TARGET << "\n";
56 #include "llvm/Config/SZTargets.def" 53 #include "llvm/Config/SZTargets.def"
57 } 54 }
58 55
59 for (size_t i = 0; i < llvm::array_lengthof(ConditionalBuildAttributes); 56 for (size_t i = 0; i < llvm::array_lengthof(ConditionalBuildAttributes);
60 ++i) { 57 ++i) {
61 switch (ConditionalBuildAttributes[i].FlagValue) { 58 switch (ConditionalBuildAttributes[i].FlagValue) {
62 case 0: 59 case 0:
63 if (Stream) 60 if (Stream)
64 *Stream << "no_" << ConditionalBuildAttributes[i].FlagName << "\n"; 61 *Stream << "no_" << ConditionalBuildAttributes[i].FlagName << "\n";
(...skipping 96 matching lines...)
161 Ctx.dumpTimers(); 158 Ctx.dumpTimers();
162 if (Ctx.getFlags().getTimeEachFunction()) { 159 if (Ctx.getFlags().getTimeEachFunction()) {
163 const bool DumpCumulative = false; 160 const bool DumpCumulative = false;
164 Ctx.dumpTimers(GlobalContext::TSK_Funcs, DumpCumulative); 161 Ctx.dumpTimers(GlobalContext::TSK_Funcs, DumpCumulative);
165 } 162 }
166 const bool FinalStats = true; 163 const bool FinalStats = true;
167 Ctx.dumpStats("_FINAL_", FinalStats); 164 Ctx.dumpStats("_FINAL_", FinalStats);
168 } 165 }
169 166
170 } // end of namespace Ice 167 } // end of namespace Ice
OLDNEW
« no previous file with comments | « no previous file | tests_lit/llvm2ice_tests/addr-opt-multi-def-var.ll » ('j') | no next file with comments »

Powered by Google App Engine