forked from OSchip/llvm-project
Use array_lengthof instead of sizeof trickery.
llvm-svn: 156104
This commit is contained in:
parent
cf4ac44377
commit
45cf50f7b6
|
@ -219,8 +219,7 @@ void Compilation::initCompilationForDiagnostics(void) {
|
|||
// to avoid emitting warnings about unused args.
|
||||
OptSpecifier OutputOpts[] = { options::OPT_o, options::OPT_MD,
|
||||
options::OPT_MMD };
|
||||
for (unsigned i = 0, e = sizeof(OutputOpts)/sizeof(OutputOpts[0]); i != e;
|
||||
++i) {
|
||||
for (unsigned i = 0, e = llvm::array_lengthof(OutputOpts); i != e; ++i) {
|
||||
if (TranslatedArgs->hasArg(OutputOpts[i]))
|
||||
TranslatedArgs->eraseArg(OutputOpts[i]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue