1111#include  " support/Logger.h" 
1212#include  " support/Trace.h" 
1313#include  " clang/Driver/Driver.h" 
14- #include  " clang/Driver/Options.h" 
1514#include  " clang/Frontend/CompilerInvocation.h" 
15+ #include  " clang/Options/Options.h" 
1616#include  " clang/Tooling/CompilationDatabase.h" 
1717#include  " clang/Tooling/Tooling.h" 
1818#include  " llvm/ADT/ArrayRef.h" 
@@ -206,7 +206,7 @@ void CommandMangler::operator()(tooling::CompileCommand &Command,
206206  if  (Cmd.empty ())
207207    return ;
208208
209-   auto  &OptTable = clang::driver:: getDriverOptTable ();
209+   auto  &OptTable = getDriverOptTable ();
210210  //  OriginalArgs needs to outlive ArgList.
211211  llvm::SmallVector<const  char  *, 16 > OriginalArgs;
212212  OriginalArgs.reserve (Cmd.size ());
@@ -222,8 +222,8 @@ void CommandMangler::operator()(tooling::CompileCommand &Command,
222222  llvm::opt::InputArgList ArgList;
223223  ArgList = OptTable.ParseArgs (
224224      llvm::ArrayRef (OriginalArgs).drop_front (), IgnoredCount, IgnoredCount,
225-       llvm::opt::Visibility (IsCLMode ? driver:: options::CLOption
226-                                      : driver:: options::ClangOption));
225+       llvm::opt::Visibility (IsCLMode ? options::CLOption
226+                                      : options::ClangOption));
227227
228228  llvm::SmallVector<unsigned , 1 > IndicesToDrop;
229229  //  Having multiple architecture options (e.g. when building fat binaries)
@@ -232,7 +232,7 @@ void CommandMangler::operator()(tooling::CompileCommand &Command,
232232  //  As there are no signals to figure out which one user actually wants. They
233233  //  can explicitly specify one through `CompileFlags.Add` if need be.
234234  unsigned  ArchOptCount = 0 ;
235-   for  (auto  *Input : ArgList.filtered (driver:: options::OPT_arch)) {
235+   for  (auto  *Input : ArgList.filtered (options::OPT_arch)) {
236236    ++ArchOptCount;
237237    for  (auto  I = 0U ; I <= Input->getNumValues (); ++I)
238238      IndicesToDrop.push_back (Input->getIndex () + I);
@@ -262,13 +262,13 @@ void CommandMangler::operator()(tooling::CompileCommand &Command,
262262  //  explicitly at the end of the flags. This ensures modifications done in the
263263  //  following steps apply in more cases (like setting -x, which only affects
264264  //  inputs that come after it).
265-   for  (auto  *Input : ArgList.filtered (driver:: options::OPT_INPUT)) {
265+   for  (auto  *Input : ArgList.filtered (options::OPT_INPUT)) {
266266    SawInput (Input->getValue (0 ));
267267    IndicesToDrop.push_back (Input->getIndex ());
268268  }
269269  //  Anything after `--` is also treated as input, drop them as well.
270270  if  (auto  *DashDash =
271-           ArgList.getLastArgNoClaim (driver:: options::OPT__DASH_DASH)) {
271+           ArgList.getLastArgNoClaim (options::OPT__DASH_DASH)) {
272272    auto  DashDashIndex = DashDash->getIndex () + 1 ; //  +1 accounts for Cmd[0]
273273    //  Another +1 so we don't treat the `--` itself as an input.
274274    for  (unsigned  I = DashDashIndex + 1 ; I < Cmd.size (); ++I)
@@ -424,11 +424,11 @@ DriverMode getDriverMode(const std::vector<std::string> &Args) {
424424//  Returns the set of DriverModes where an option may be used.
425425unsigned  char  getModes (const  llvm::opt::Option &Opt) {
426426  unsigned  char  Result = DM_None;
427-   if  (Opt.hasVisibilityFlag (driver:: options::ClangOption))
427+   if  (Opt.hasVisibilityFlag (options::ClangOption))
428428    Result |= DM_GCC;
429-   if  (Opt.hasVisibilityFlag (driver:: options::CC1Option))
429+   if  (Opt.hasVisibilityFlag (options::CC1Option))
430430    Result |= DM_CC1;
431-   if  (Opt.hasVisibilityFlag (driver:: options::CLOption))
431+   if  (Opt.hasVisibilityFlag (options::CLOption))
432432    Result |= DM_CL;
433433  return  Result;
434434}
@@ -442,8 +442,8 @@ llvm::ArrayRef<ArgStripper::Rule> ArgStripper::rulesFor(llvm::StringRef Arg) {
442442  using  TableTy =
443443      llvm::StringMap<llvm::SmallVector<Rule, 4 >, llvm::BumpPtrAllocator>;
444444  static  TableTy *Table = [] {
445-     auto  &DriverTable = driver:: getDriverOptTable ();
446-     using  DriverID = clang::driver:: options::ID;
445+     auto  &DriverTable = getDriverOptTable ();
446+     using  DriverID = clang::options::ID;
447447
448448    //  Collect sets of aliases, so we can treat -foo and -foo= as synonyms.
449449    //  Conceptually a double-linked list: PrevAlias[I] -> I -> NextAlias[I].
@@ -468,7 +468,7 @@ llvm::ArrayRef<ArgStripper::Rule> ArgStripper::rulesFor(llvm::StringRef Arg) {
468468               FLAGS, VISIBILITY, PARAM, HELPTEXT, HELPTEXTSFORVARIANTS,       \
469469               METAVAR, VALUES, SUBCOMMANDIDS_OFFSET)                          \
470470  {DriverID::OPT_##ID, DriverID::OPT_##ALIAS, ALIASARGS},
471- #include  " clang/Driver /Options.inc" 
471+ #include  " clang/Options /Options.inc" 
472472#undef  OPTION
473473    };
474474    for  (auto  &E : AliasTable)
0 commit comments