blob: 4db8a58b50808c792b8270e38fede5f162c3ed06 [file] [log] [blame]
// Copyright 2018 The Goma Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <memory>
#include <string>
#include <vector>
#include "lib/compiler_flags.h"
using std::string;
namespace devtools_goma {
class CompilerFlagsParser {
// Returns new instance of subclass of CompilerFlags based on |args|.
// Returns NULL if args is empty or args[0] is unsupported command.
static std::unique_ptr<CompilerFlags> New(const std::vector<string>& args,
const string& cwd);
// MustNew is like New but causes FATAL crash if New returns NULL.
static std::unique_ptr<CompilerFlags> MustNew(const std::vector<string>& args,
const string& cwd);
} // namespace devtools_goma