Index: include/clang/Basic/LangStandard.h
===================================================================
--- include/clang/Basic/LangStandard.h
+++ include/clang/Basic/LangStandard.h
@@ -6,16 +6,37 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_CLANG_FRONTEND_LANGSTANDARD_H
-#define LLVM_CLANG_FRONTEND_LANGSTANDARD_H
+#ifndef LLVM_CLANG_BASIC_LANGSTANDARD_H
+#define LLVM_CLANG_BASIC_LANGSTANDARD_H
 
 #include "clang/Basic/LLVM.h"
-#include "clang/Frontend/FrontendOptions.h"
 #include "llvm/ADT/StringRef.h"
 
 namespace clang {
 
-namespace frontend {
+/// The language for the input, used to select and validate the language
+/// standard and possible actions.
+enum Language {
+  Unknown,
+
+  /// Assembly: we accept this only so that we can preprocess it.
+  Asm,
+
+  /// LLVM IR: we accept this so that we can run the optimizer on it,
+  /// and compile it to assembly or object code.
+  LLVM_IR,
+
+  ///@{ Languages that the frontend can parse and compile.
+  C,
+  CXX,
+  ObjC,
+  ObjCXX,
+  OpenCL,
+  CUDA,
+  RenderScript,
+  HIP,
+  ///@}
+};
 
 enum LangFeatures {
   LineComment = (1 << 0),
@@ -32,25 +53,23 @@
   GNUMode = (1 << 11),
   HexFloat = (1 << 12),
   ImplicitInt = (1 << 13),
-  OpenCL = (1 << 14)
+  LF_OpenCL = (1 << 14)
 };
 
-}
-
 /// LangStandard - Information about the properties of a particular language
 /// standard.
 struct LangStandard {
   enum Kind {
 #define LANGSTANDARD(id, name, lang, desc, features) \
     lang_##id,
-#include "clang/Frontend/LangStandards.def"
+#include "clang/Basic/LangStandards.def"
     lang_unspecified
   };
 
   const char *ShortName;
   const char *Description;
   unsigned Flags;
-  InputKind::Language Language;
+  clang::Language Language;
 
 public:
   /// getName - Get the name of this standard.
@@ -60,54 +79,55 @@
   const char *getDescription() const { return Description; }
 
   /// Get the language that this standard describes.
-  InputKind::Language getLanguage() const { return Language; }
+  clang::Language getLanguage() const { return Language; }
 
   /// Language supports '//' comments.
-  bool hasLineComments() const { return Flags & frontend::LineComment; }
+  bool hasLineComments() const { return Flags & LineComment; }
 
   /// isC99 - Language is a superset of C99.
-  bool isC99() const { return Flags & frontend::C99; }
+  bool isC99() const { return Flags & C99; }
 
   /// isC11 - Language is a superset of C11.
-  bool isC11() const { return Flags & frontend::C11; }
+  bool isC11() const { return Flags & C11; }
 
   /// isC17 - Language is a superset of C17.
-  bool isC17() const { return Flags & frontend::C17; }
+  bool isC17() const { return Flags & C17; }
 
   /// isC2x - Language is a superset of C2x.
-  bool isC2x() const { return Flags & frontend::C2x; }
+  bool isC2x() const { return Flags & C2x; }
 
   /// isCPlusPlus - Language is a C++ variant.
-  bool isCPlusPlus() const { return Flags & frontend::CPlusPlus; }
+  bool isCPlusPlus() const { return Flags & CPlusPlus; }
 
   /// isCPlusPlus11 - Language is a C++11 variant (or later).
-  bool isCPlusPlus11() const { return Flags & frontend::CPlusPlus11; }
+  bool isCPlusPlus11() const { return Flags & CPlusPlus11; }
 
   /// isCPlusPlus14 - Language is a C++14 variant (or later).
-  bool isCPlusPlus14() const { return Flags & frontend::CPlusPlus14; }
+  bool isCPlusPlus14() const { return Flags & CPlusPlus14; }
 
   /// isCPlusPlus17 - Language is a C++17 variant (or later).
-  bool isCPlusPlus17() const { return Flags & frontend::CPlusPlus17; }
+  bool isCPlusPlus17() const { return Flags & CPlusPlus17; }
 
   /// isCPlusPlus2a - Language is a post-C++17 variant (or later).
-  bool isCPlusPlus2a() const { return Flags & frontend::CPlusPlus2a; }
+  bool isCPlusPlus2a() const { return Flags & CPlusPlus2a; }
 
 
   /// hasDigraphs - Language supports digraphs.
-  bool hasDigraphs() const { return Flags & frontend::Digraphs; }
+  bool hasDigraphs() const { return Flags & Digraphs; }
 
   /// isGNUMode - Language includes GNU extensions.
-  bool isGNUMode() const { return Flags & frontend::GNUMode; }
+  bool isGNUMode() const { return Flags & GNUMode; }
 
   /// hasHexFloats - Language supports hexadecimal float constants.
-  bool hasHexFloats() const { return Flags & frontend::HexFloat; }
+  bool hasHexFloats() const { return Flags & HexFloat; }
 
   /// hasImplicitInt - Language allows variables to be typed as int implicitly.
-  bool hasImplicitInt() const { return Flags & frontend::ImplicitInt; }
+  bool hasImplicitInt() const { return Flags & ImplicitInt; }
 
   /// isOpenCL - Language is a OpenCL variant.
-  bool isOpenCL() const { return Flags & frontend::OpenCL; }
+  bool isOpenCL() const { return Flags & LF_OpenCL; }
 
+  static Kind getLangKind(StringRef Name);
   static const LangStandard &getLangStandardForKind(Kind K);
   static const LangStandard *getLangStandardForName(StringRef Name);
 };
Index: include/clang/Basic/LangStandards.def
===================================================================
--- include/clang/Basic/LangStandards.def
+++ include/clang/Basic/LangStandards.def
@@ -14,7 +14,7 @@
 ///
 /// \param IDENT - The name of the standard as a C++ identifier.
 /// \param NAME - The name of the standard.
-/// \param LANG - The InputKind::Language for which this is a standard.
+/// \param LANG - The Language for which this is a standard.
 /// \param DESC - A short description of the standard.
 /// \param FEATURES - The standard features as flags, these are enums from the
 /// clang::frontend namespace, which is assumed to be be available.
@@ -153,22 +153,22 @@
 // OpenCL
 LANGSTANDARD(opencl10, "cl1.0",
              OpenCL, "OpenCL 1.0",
-             LineComment | C99 | Digraphs | HexFloat | OpenCL)
+             LineComment | C99 | Digraphs | HexFloat | LF_OpenCL)
 LANGSTANDARD_ALIAS_DEPR(opencl10, "cl")
 
 LANGSTANDARD(opencl11, "cl1.1",
              OpenCL, "OpenCL 1.1",
-             LineComment | C99 | Digraphs | HexFloat | OpenCL)
+             LineComment | C99 | Digraphs | HexFloat | LF_OpenCL)
 LANGSTANDARD(opencl12, "cl1.2",
              OpenCL, "OpenCL 1.2",
-             LineComment | C99 | Digraphs | HexFloat | OpenCL)
+             LineComment | C99 | Digraphs | HexFloat | LF_OpenCL)
 LANGSTANDARD(opencl20, "cl2.0",
              OpenCL, "OpenCL 2.0",
-             LineComment | C99 | Digraphs | HexFloat | OpenCL)
+             LineComment | C99 | Digraphs | HexFloat | LF_OpenCL)
 LANGSTANDARD(openclcpp, "c++",
              OpenCL, "C++ for OpenCL",
              LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus17 |
-             Digraphs | HexFloat | OpenCL)
+             Digraphs | HexFloat | LF_OpenCL)
 
 LANGSTANDARD_ALIAS_DEPR(opencl10, "CL")
 LANGSTANDARD_ALIAS_DEPR(opencl11, "CL1.1")
Index: include/clang/Driver/Options.td
===================================================================
--- include/clang/Driver/Options.td
+++ include/clang/Driver/Options.td
@@ -2631,7 +2631,7 @@
     const char *Values =
     #define LANGSTANDARD(id, name, lang, desc, features) name ","
     #define LANGSTANDARD_ALIAS(id, alias) alias ","
-    #include "clang/Frontend/LangStandards.def"
+    #include "clang/Basic/LangStandards.def"
     ;
   }]>;
 def stdlib_EQ : Joined<["-", "--"], "stdlib=">, Flags<[CC1Option]>,
Index: include/clang/Frontend/CompilerInvocation.h
===================================================================
--- include/clang/Frontend/CompilerInvocation.h
+++ include/clang/Frontend/CompilerInvocation.h
@@ -14,9 +14,9 @@
 #include "clang/Basic/FileSystemOptions.h"
 #include "clang/Basic/LLVM.h"
 #include "clang/Basic/LangOptions.h"
+#include "clang/Basic/LangStandard.h"
 #include "clang/Frontend/DependencyOutputOptions.h"
 #include "clang/Frontend/FrontendOptions.h"
-#include "clang/Frontend/LangStandard.h"
 #include "clang/Frontend/MigratorOptions.h"
 #include "clang/Frontend/PreprocessorOutputOptions.h"
 #include "clang/StaticAnalyzer/Core/AnalyzerOptions.h"
Index: include/clang/Frontend/FrontendOptions.h
===================================================================
--- include/clang/Frontend/FrontendOptions.h
+++ include/clang/Frontend/FrontendOptions.h
@@ -10,6 +10,7 @@
 #define LLVM_CLANG_FRONTEND_FRONTENDOPTIONS_H
 
 #include "clang/AST/ASTDumperUtils.h"
+#include "clang/Basic/LangStandard.h"
 #include "clang/Frontend/CommandLineSourceLoc.h"
 #include "clang/Serialization/ModuleFileExtension.h"
 #include "clang/Sema/CodeCompleteOptions.h"
@@ -148,30 +149,6 @@
   unsigned Preprocessed : 1;
 
 public:
-  /// The language for the input, used to select and validate the language
-  /// standard and possible actions.
-  enum Language {
-    Unknown,
-
-    /// Assembly: we accept this only so that we can preprocess it.
-    Asm,
-
-    /// LLVM IR: we accept this so that we can run the optimizer on it,
-    /// and compile it to assembly or object code.
-    LLVM_IR,
-
-    ///@{ Languages that the frontend can parse and compile.
-    C,
-    CXX,
-    ObjC,
-    ObjCXX,
-    OpenCL,
-    CUDA,
-    RenderScript,
-    HIP,
-    ///@}
-  };
-
   /// The input file format.
   enum Format {
     Source,
@@ -467,9 +444,9 @@
         IncludeTimestamps(true), TimeTraceGranularity(500) {}
 
   /// getInputKindForExtension - Return the appropriate input kind for a file
-  /// extension. For example, "c" would return InputKind::C.
+  /// extension. For example, "c" would return C.
   ///
-  /// \return The input kind for the extension, or InputKind::Unknown if the
+  /// \return The input kind for the extension, or Unknown if the
   /// extension is not recognized.
   static InputKind getInputKindForExtension(StringRef Extension);
 };
Index: include/clang/module.modulemap
===================================================================
--- include/clang/module.modulemap
+++ include/clang/module.modulemap
@@ -100,7 +100,7 @@
   requires cplusplus
   umbrella "Frontend"
 
-  textual header "Frontend/LangStandards.def"
+  textual header "Basic/LangStandards.def"
 
   module * { export * }
 }
Index: lib/Basic/CMakeLists.txt
===================================================================
--- lib/Basic/CMakeLists.txt
+++ lib/Basic/CMakeLists.txt
@@ -50,6 +50,7 @@
   FixedPoint.cpp
   IdentifierTable.cpp
   LangOptions.cpp
+  LangStandards.cpp
   Module.cpp
   ObjCRuntime.cpp
   OpenMPKinds.cpp
Index: lib/Basic/LangStandards.cpp
===================================================================
--- lib/Basic/LangStandards.cpp
+++ lib/Basic/LangStandards.cpp
@@ -6,15 +6,14 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "clang/Frontend/LangStandard.h"
+#include "clang/Basic/LangStandard.h"
 #include "llvm/ADT/StringSwitch.h"
 #include "llvm/Support/ErrorHandling.h"
 using namespace clang;
-using namespace clang::frontend;
 
 #define LANGSTANDARD(id, name, lang, desc, features) \
-static const LangStandard Lang_##id = { name, desc, features, InputKind::lang };
-#include "clang/Frontend/LangStandards.def"
+static const LangStandard Lang_##id = { name, desc, features, lang };
+#include "clang/Basic/LangStandards.def"
 
 const LangStandard &LangStandard::getLangStandardForKind(Kind K) {
   switch (K) {
@@ -22,17 +21,23 @@
     llvm::report_fatal_error("getLangStandardForKind() on unspecified kind");
 #define LANGSTANDARD(id, name, lang, desc, features) \
     case lang_##id: return Lang_##id;
-#include "clang/Frontend/LangStandards.def"
+#include "clang/Basic/LangStandards.def"
   }
   llvm_unreachable("Invalid language kind!");
 }
 
-const LangStandard *LangStandard::getLangStandardForName(StringRef Name) {
-  Kind K = llvm::StringSwitch<Kind>(Name)
+LangStandard::Kind LangStandard::getLangKind(StringRef Name) {
+  return llvm::StringSwitch<Kind>(Name)
 #define LANGSTANDARD(id, name, lang, desc, features) \
-    .Case(name, lang_##id)
-#include "clang/Frontend/LangStandards.def"
-    .Default(lang_unspecified);
+  .Case(name, lang_##id)
+#define LANGSTANDARD_ALIAS(id, alias) \
+  .Case(alias, lang_##id)
+#include "clang/Basic/LangStandards.def"
+  .Default(lang_unspecified);
+}
+
+const LangStandard *LangStandard::getLangStandardForName(StringRef Name) {
+  Kind K = getLangKind(Name);
   if (K == lang_unspecified)
     return nullptr;
 
Index: lib/CodeGen/CodeGenAction.cpp
===================================================================
--- lib/CodeGen/CodeGenAction.cpp
+++ lib/CodeGen/CodeGenAction.cpp
@@ -15,6 +15,7 @@
 #include "clang/AST/DeclCXX.h"
 #include "clang/AST/DeclGroup.h"
 #include "clang/Basic/FileManager.h"
+#include "clang/Basic/LangStandard.h"
 #include "clang/Basic/SourceManager.h"
 #include "clang/Basic/TargetInfo.h"
 #include "clang/CodeGen/BackendUtil.h"
@@ -1014,7 +1015,7 @@
 
 void CodeGenAction::ExecuteAction() {
   // If this is an IR file, we have to treat it specially.
-  if (getCurrentFileKind().getLanguage() == InputKind::LLVM_IR) {
+  if (getCurrentFileKind().getLanguage() == LLVM_IR) {
     BackendAction BA = static_cast<BackendAction>(Act);
     CompilerInstance &CI = getCompilerInstance();
     std::unique_ptr<raw_pwrite_stream> OS =
Index: lib/Frontend/ASTUnit.cpp
===================================================================
--- lib/Frontend/ASTUnit.cpp
+++ lib/Frontend/ASTUnit.cpp
@@ -30,6 +30,7 @@
 #include "clang/Basic/IdentifierTable.h"
 #include "clang/Basic/LLVM.h"
 #include "clang/Basic/LangOptions.h"
+#include "clang/Basic/LangStandard.h"
 #include "clang/Basic/Module.h"
 #include "clang/Basic/SourceLocation.h"
 #include "clang/Basic/SourceManager.h"
@@ -1153,7 +1154,7 @@
              InputKind::Source &&
          "FIXME: AST inputs not yet supported here!");
   assert(Clang->getFrontendOpts().Inputs[0].getKind().getLanguage() !=
-             InputKind::LLVM_IR &&
+             LLVM_IR &&
          "IR inputs not support here!");
 
   // Configure the various subsystems.
@@ -1586,7 +1587,7 @@
              InputKind::Source &&
          "FIXME: AST inputs not yet supported here!");
   assert(Clang->getFrontendOpts().Inputs[0].getKind().getLanguage() !=
-             InputKind::LLVM_IR &&
+             LLVM_IR &&
          "IR inputs not support here!");
 
   // Configure the various subsystems.
@@ -2210,7 +2211,7 @@
              InputKind::Source &&
          "FIXME: AST inputs not yet supported here!");
   assert(Clang->getFrontendOpts().Inputs[0].getKind().getLanguage() !=
-             InputKind::LLVM_IR &&
+             LLVM_IR &&
          "IR inputs not support here!");
 
   // Use the source and file managers that we were given.
@@ -2667,17 +2668,17 @@
 InputKind ASTUnit::getInputKind() const {
   auto &LangOpts = getLangOpts();
 
-  InputKind::Language Lang;
+  Language Lang;
   if (LangOpts.OpenCL)
-    Lang = InputKind::OpenCL;
+    Lang = OpenCL;
   else if (LangOpts.CUDA)
-    Lang = InputKind::CUDA;
+    Lang = CUDA;
   else if (LangOpts.RenderScript)
-    Lang = InputKind::RenderScript;
+    Lang = RenderScript;
   else if (LangOpts.CPlusPlus)
-    Lang = LangOpts.ObjC ? InputKind::ObjCXX : InputKind::CXX;
+    Lang = LangOpts.ObjC ? ObjCXX : CXX;
   else
-    Lang = LangOpts.ObjC ? InputKind::ObjC : InputKind::C;
+    Lang = LangOpts.ObjC ? ObjC : C;
 
   InputKind::Format Fmt = InputKind::Source;
   if (LangOpts.getCompilingModule() == LangOptions::CMK_ModuleMap)
Index: lib/Frontend/CMakeLists.txt
===================================================================
--- lib/Frontend/CMakeLists.txt
+++ lib/Frontend/CMakeLists.txt
@@ -32,7 +32,6 @@
   HeaderIncludeGen.cpp
   InitHeaderSearch.cpp
   InitPreprocessor.cpp
-  LangStandards.cpp
   LayoutOverrideSource.cpp
   LogDiagnosticPrinter.cpp
   ModuleDependencyCollector.cpp
Index: lib/Frontend/CompilerInstance.cpp
===================================================================
--- lib/Frontend/CompilerInstance.cpp
+++ lib/Frontend/CompilerInstance.cpp
@@ -13,6 +13,7 @@
 #include "clang/Basic/CharInfo.h"
 #include "clang/Basic/Diagnostic.h"
 #include "clang/Basic/FileManager.h"
+#include "clang/Basic/LangStandard.h"
 #include "clang/Basic/SourceManager.h"
 #include "clang/Basic/Stack.h"
 #include "clang/Basic/TargetInfo.h"
@@ -1001,14 +1002,14 @@
 
 /// Determine the appropriate source input kind based on language
 /// options.
-static InputKind::Language getLanguageFromOptions(const LangOptions &LangOpts) {
+static Language getLanguageFromOptions(const LangOptions &LangOpts) {
   if (LangOpts.OpenCL)
-    return InputKind::OpenCL;
+    return OpenCL;
   if (LangOpts.CUDA)
-    return InputKind::CUDA;
+    return CUDA;
   if (LangOpts.ObjC)
-    return LangOpts.CPlusPlus ? InputKind::ObjCXX : InputKind::ObjC;
-  return LangOpts.CPlusPlus ? InputKind::CXX : InputKind::C;
+    return LangOpts.CPlusPlus ? ObjCXX : ObjC;
+  return LangOpts.CPlusPlus ? CXX : C;
 }
 
 /// Compile a module file for the given module, using the options
Index: lib/Frontend/CompilerInvocation.cpp
===================================================================
--- lib/Frontend/CompilerInvocation.cpp
+++ lib/Frontend/CompilerInvocation.cpp
@@ -18,6 +18,7 @@
 #include "clang/Basic/FileSystemOptions.h"
 #include "clang/Basic/LLVM.h"
 #include "clang/Basic/LangOptions.h"
+#include "clang/Basic/LangStandard.h"
 #include "clang/Basic/ObjCRuntime.h"
 #include "clang/Basic/Sanitizers.h"
 #include "clang/Basic/SourceLocation.h"
@@ -34,7 +35,6 @@
 #include "clang/Frontend/FrontendDiagnostic.h"
 #include "clang/Frontend/FrontendOptions.h"
 #include "clang/Frontend/FrontendPluginRegistry.h"
-#include "clang/Frontend/LangStandard.h"
 #include "clang/Frontend/MigratorOptions.h"
 #include "clang/Frontend/PreprocessorOutputOptions.h"
 #include "clang/Frontend/Utils.h"
@@ -122,7 +122,7 @@
 static unsigned getOptimizationLevel(ArgList &Args, InputKind IK,
                                      DiagnosticsEngine &Diags) {
   unsigned DefaultOpt = llvm::CodeGenOpt::None;
-  if (IK.getLanguage() == InputKind::OpenCL && !Args.hasArg(OPT_cl_opt_disable))
+  if (IK.getLanguage() == OpenCL && !Args.hasArg(OPT_cl_opt_disable))
     DefaultOpt = llvm::CodeGenOpt::Default;
 
   if (Arg *A = Args.getLastArg(options::OPT_O_Group)) {
@@ -944,7 +944,7 @@
   Opts.LTOUnit = Args.hasFlag(OPT_flto_unit, OPT_fno_lto_unit, false);
   Opts.EnableSplitLTOUnit = Args.hasArg(OPT_fsplit_lto_unit);
   if (Arg *A = Args.getLastArg(OPT_fthinlto_index_EQ)) {
-    if (IK.getLanguage() != InputKind::LLVM_IR)
+    if (IK.getLanguage() != LLVM_IR)
       Diags.Report(diag::err_drv_argument_only_allowed_with)
           << A->getAsString(Args) << "-x ir";
     Opts.ThinLTOIndexFile = Args.getLastArgValue(OPT_fthinlto_index_EQ);
@@ -1285,7 +1285,7 @@
 
   if (Opts.DiagnosticsWithHotness && !UsingProfile &&
       // An IR file will contain PGO as metadata
-      IK.getLanguage() != InputKind::LLVM_IR)
+      IK.getLanguage() != LLVM_IR)
     Diags.Report(diag::warn_drv_diagnostics_hotness_requires_pgo)
         << "-fdiagnostics-show-hotness";
 
@@ -1902,7 +1902,7 @@
       << "ARC migration" << "ObjC migration";
   }
 
-  InputKind DashX(InputKind::Unknown);
+  InputKind DashX(Unknown);
   if (const Arg *A = Args.getLastArg(OPT_x)) {
     StringRef XValue = A->getValue();
 
@@ -1915,33 +1915,33 @@
 
     // Principal languages.
     DashX = llvm::StringSwitch<InputKind>(XValue)
-                .Case("c", InputKind::C)
-                .Case("cl", InputKind::OpenCL)
-                .Case("cuda", InputKind::CUDA)
-                .Case("hip", InputKind::HIP)
-                .Case("c++", InputKind::CXX)
-                .Case("objective-c", InputKind::ObjC)
-                .Case("objective-c++", InputKind::ObjCXX)
-                .Case("renderscript", InputKind::RenderScript)
-                .Default(InputKind::Unknown);
+                .Case("c", C)
+                .Case("cl", OpenCL)
+                .Case("cuda", CUDA)
+                .Case("hip", HIP)
+                .Case("c++", CXX)
+                .Case("objective-c", ObjC)
+                .Case("objective-c++", ObjCXX)
+                .Case("renderscript", RenderScript)
+                .Default(Unknown);
 
     // "objc[++]-cpp-output" is an acceptable synonym for
     // "objective-c[++]-cpp-output".
     if (DashX.isUnknown() && Preprocessed && !IsHeaderFile && !ModuleMap)
       DashX = llvm::StringSwitch<InputKind>(XValue)
-                  .Case("objc", InputKind::ObjC)
-                  .Case("objc++", InputKind::ObjCXX)
-                  .Default(InputKind::Unknown);
+                  .Case("objc", ObjC)
+                  .Case("objc++", ObjCXX)
+                  .Default(Unknown);
 
     // Some special cases cannot be combined with suffixes.
     if (DashX.isUnknown() && !Preprocessed && !ModuleMap && !IsHeaderFile)
       DashX = llvm::StringSwitch<InputKind>(XValue)
-                  .Case("cpp-output", InputKind(InputKind::C).getPreprocessed())
-                  .Case("assembler-with-cpp", InputKind::Asm)
+                  .Case("cpp-output", InputKind(C).getPreprocessed())
+                  .Case("assembler-with-cpp", Asm)
                   .Cases("ast", "pcm",
-                         InputKind(InputKind::Unknown, InputKind::Precompiled))
-                  .Case("ir", InputKind::LLVM_IR)
-                  .Default(InputKind::Unknown);
+                         InputKind(Unknown, InputKind::Precompiled))
+                  .Case("ir", LLVM_IR)
+                  .Default(Unknown);
 
     if (DashX.isUnknown())
       Diags.Report(diag::err_drv_invalid_value)
@@ -1965,7 +1965,7 @@
         StringRef(Inputs[i]).rsplit('.').second);
       // FIXME: Warn on this?
       if (IK.isUnknown())
-        IK = InputKind::C;
+        IK = C;
       // FIXME: Remove this hack.
       if (i == 0)
         DashX = IK;
@@ -2139,7 +2139,7 @@
   // FIXME: Perhaps a better model would be for a single source file to have
   // multiple language standards (C / C++ std, ObjC std, OpenCL std, OpenMP std)
   // simultaneously active?
-  if (IK.getLanguage() == InputKind::Asm) {
+  if (IK.getLanguage() == Asm) {
     Opts.AsmPreprocessor = 1;
   } else if (IK.isObjectiveC()) {
     Opts.ObjC = 1;
@@ -2148,17 +2148,17 @@
   if (LangStd == LangStandard::lang_unspecified) {
     // Based on the base language, pick one.
     switch (IK.getLanguage()) {
-    case InputKind::Unknown:
-    case InputKind::LLVM_IR:
+    case Unknown:
+    case LLVM_IR:
       llvm_unreachable("Invalid input kind!");
-    case InputKind::OpenCL:
+    case OpenCL:
       LangStd = LangStandard::lang_opencl10;
       break;
-    case InputKind::CUDA:
+    case CUDA:
       LangStd = LangStandard::lang_cuda;
       break;
-    case InputKind::Asm:
-    case InputKind::C:
+    case Asm:
+    case C:
 #if defined(CLANG_DEFAULT_STD_C)
       LangStd = CLANG_DEFAULT_STD_C;
 #else
@@ -2169,25 +2169,25 @@
         LangStd = LangStandard::lang_gnu11;
 #endif
       break;
-    case InputKind::ObjC:
+    case ObjC:
 #if defined(CLANG_DEFAULT_STD_C)
       LangStd = CLANG_DEFAULT_STD_C;
 #else
       LangStd = LangStandard::lang_gnu11;
 #endif
       break;
-    case InputKind::CXX:
-    case InputKind::ObjCXX:
+    case CXX:
+    case ObjCXX:
 #if defined(CLANG_DEFAULT_STD_CXX)
       LangStd = CLANG_DEFAULT_STD_CXX;
 #else
       LangStd = LangStandard::lang_gnucxx14;
 #endif
       break;
-    case InputKind::RenderScript:
+    case RenderScript:
       LangStd = LangStandard::lang_c99;
       break;
-    case InputKind::HIP:
+    case HIP:
       LangStd = LangStandard::lang_hip;
       break;
     }
@@ -2244,13 +2244,13 @@
     }
   }
 
-  Opts.HIP = IK.getLanguage() == InputKind::HIP;
-  Opts.CUDA = IK.getLanguage() == InputKind::CUDA || Opts.HIP;
+  Opts.HIP = IK.getLanguage() == HIP;
+  Opts.CUDA = IK.getLanguage() == CUDA || Opts.HIP;
   if (Opts.CUDA)
     // Set default FP_CONTRACT to FAST.
     Opts.setDefaultFPContractMode(LangOptions::FPC_Fast);
 
-  Opts.RenderScript = IK.getLanguage() == InputKind::RenderScript;
+  Opts.RenderScript = IK.getLanguage() == RenderScript;
   if (Opts.RenderScript) {
     Opts.NativeHalfType = 1;
     Opts.NativeHalfArgsAndReturns = 1;
@@ -2298,32 +2298,32 @@
 static bool IsInputCompatibleWithStandard(InputKind IK,
                                           const LangStandard &S) {
   switch (IK.getLanguage()) {
-  case InputKind::Unknown:
-  case InputKind::LLVM_IR:
+  case Unknown:
+  case LLVM_IR:
     llvm_unreachable("should not parse language flags for this input");
 
-  case InputKind::C:
-  case InputKind::ObjC:
-  case InputKind::RenderScript:
-    return S.getLanguage() == InputKind::C;
-
-  case InputKind::OpenCL:
-    return S.getLanguage() == InputKind::OpenCL;
-
-  case InputKind::CXX:
-  case InputKind::ObjCXX:
-    return S.getLanguage() == InputKind::CXX;
-
-  case InputKind::CUDA:
+  case C:
+  case ObjC:
+  case RenderScript:
+    return S.getLanguage() == C;
+
+  case OpenCL:
+    return S.getLanguage() == OpenCL;
+
+  case CXX:
+  case ObjCXX:
+    return S.getLanguage() == CXX;
+
+  case CUDA:
     // FIXME: What -std= values should be permitted for CUDA compilations?
-    return S.getLanguage() == InputKind::CUDA ||
-           S.getLanguage() == InputKind::CXX;
-
-  case InputKind::HIP:
-    return S.getLanguage() == InputKind::CXX ||
-           S.getLanguage() == InputKind::HIP;
-
-  case InputKind::Asm:
+    return S.getLanguage() == CUDA ||
+           S.getLanguage() == CXX;
+
+  case HIP:
+    return S.getLanguage() == CXX ||
+           S.getLanguage() == HIP;
+
+  case Asm:
     // Accept (and ignore) all -std= values.
     // FIXME: The -std= value is not ignored; it affects the tokenization
     // and preprocessing rules if we're preprocessing this asm input.
@@ -2336,29 +2336,29 @@
 /// Get language name for given input kind.
 static const StringRef GetInputKindName(InputKind IK) {
   switch (IK.getLanguage()) {
-  case InputKind::C:
+  case C:
     return "C";
-  case InputKind::ObjC:
+  case ObjC:
     return "Objective-C";
-  case InputKind::CXX:
+  case CXX:
     return "C++";
-  case InputKind::ObjCXX:
+  case ObjCXX:
     return "Objective-C++";
-  case InputKind::OpenCL:
+  case OpenCL:
     return "OpenCL";
-  case InputKind::CUDA:
+  case CUDA:
     return "CUDA";
-  case InputKind::RenderScript:
+  case RenderScript:
     return "RenderScript";
-  case InputKind::HIP:
+  case HIP:
     return "HIP";
 
-  case InputKind::Asm:
+  case Asm:
     return "Asm";
-  case InputKind::LLVM_IR:
+  case LLVM_IR:
     return "LLVM IR";
 
-  case InputKind::Unknown:
+  case Unknown:
     break;
   }
   llvm_unreachable("unknown input language");
@@ -2371,13 +2371,7 @@
   // FIXME: Cleanup per-file based stuff.
   LangStandard::Kind LangStd = LangStandard::lang_unspecified;
   if (const Arg *A = Args.getLastArg(OPT_std_EQ)) {
-    LangStd = llvm::StringSwitch<LangStandard::Kind>(A->getValue())
-#define LANGSTANDARD(id, name, lang, desc, features) \
-      .Case(name, LangStandard::lang_##id)
-#define LANGSTANDARD_ALIAS(id, alias) \
-      .Case(alias, LangStandard::lang_##id)
-#include "clang/Frontend/LangStandards.def"
-      .Default(LangStandard::lang_unspecified);
+    LangStd = LangStandard::getLangKind(A->getValue());
     if (LangStd == LangStandard::lang_unspecified) {
       Diags.Report(diag::err_drv_invalid_value)
         << A->getAsString(Args) << A->getValue();
@@ -2395,13 +2389,13 @@
 #define LANGSTANDARD_ALIAS(id, alias) \
           if (KindValue == LangStandard::lang_##id) ++NumAliases;
 #define LANGSTANDARD_ALIAS_DEPR(id, alias)
-#include "clang/Frontend/LangStandards.def"
+#include "clang/Basic/LangStandards.def"
           Diag << NumAliases;
 #define LANGSTANDARD(id, name, lang, desc, features)
 #define LANGSTANDARD_ALIAS(id, alias) \
           if (KindValue == LangStandard::lang_##id) Diag << alias;
 #define LANGSTANDARD_ALIAS_DEPR(id, alias)
-#include "clang/Frontend/LangStandards.def"
+#include "clang/Basic/LangStandards.def"
         }
       }
     } else {
@@ -3391,7 +3385,7 @@
                         Res.getFileSystemOpts().WorkingDir);
   llvm::Triple T(Res.getTargetOpts().Triple);
   if (DashX.getFormat() == InputKind::Precompiled ||
-      DashX.getLanguage() == InputKind::LLVM_IR) {
+      DashX.getLanguage() == LLVM_IR) {
     // ObjCAAutoRefCount and Sanitize LangOpts are used to setup the
     // PassManager in BackendUtil.cpp. They need to be initializd no matter
     // what the input type is.
@@ -3405,7 +3399,7 @@
                         Diags, LangOpts.Sanitize);
   } else {
     // Other LangOpts are only initialized when the input is not AST or LLVM IR.
-    // FIXME: Should we really be calling this for an InputKind::Asm input?
+    // FIXME: Should we really be calling this for an Asm input?
     ParseLangArgs(LangOpts, Args, DashX, Res.getTargetOpts(),
                   Res.getPreprocessorOpts(), Diags);
     if (Res.getFrontendOpts().ProgramAction == frontend::RewriteObjC)
Index: lib/Frontend/FrontendAction.cpp
===================================================================
--- lib/Frontend/FrontendAction.cpp
+++ lib/Frontend/FrontendAction.cpp
@@ -10,6 +10,7 @@
 #include "clang/AST/ASTConsumer.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/DeclGroup.h"
+#include "clang/Basic/LangStandard.h"
 #include "clang/Frontend/ASTUnit.h"
 #include "clang/Frontend/CompilerInstance.h"
 #include "clang/Frontend/FrontendDiagnostic.h"
@@ -683,7 +684,7 @@
     CI.getSourceManager().setAllFilesAreTransient(true);
 
   // IR files bypass the rest of initialization.
-  if (Input.getKind().getLanguage() == InputKind::LLVM_IR) {
+  if (Input.getKind().getLanguage() == LLVM_IR) {
     assert(hasIRSupport() &&
            "This action does not have IR file support!");
 
Index: lib/Frontend/FrontendActions.cpp
===================================================================
--- lib/Frontend/FrontendActions.cpp
+++ lib/Frontend/FrontendActions.cpp
@@ -9,6 +9,7 @@
 #include "clang/Frontend/FrontendActions.h"
 #include "clang/AST/ASTConsumer.h"
 #include "clang/Basic/FileManager.h"
+#include "clang/Basic/LangStandard.h"
 #include "clang/Frontend/ASTConsumers.h"
 #include "clang/Frontend/CompilerInstance.h"
 #include "clang/Frontend/FrontendDiagnostic.h"
@@ -832,19 +833,19 @@
 
 void PrintPreambleAction::ExecuteAction() {
   switch (getCurrentFileKind().getLanguage()) {
-  case InputKind::C:
-  case InputKind::CXX:
-  case InputKind::ObjC:
-  case InputKind::ObjCXX:
-  case InputKind::OpenCL:
-  case InputKind::CUDA:
-  case InputKind::HIP:
+  case C:
+  case CXX:
+  case ObjC:
+  case ObjCXX:
+  case OpenCL:
+  case CUDA:
+  case HIP:
     break;
 
-  case InputKind::Unknown:
-  case InputKind::Asm:
-  case InputKind::LLVM_IR:
-  case InputKind::RenderScript:
+  case Unknown:
+  case Asm:
+  case LLVM_IR:
+  case RenderScript:
     // We can't do anything with these.
     return;
   }
Index: lib/Frontend/FrontendOptions.cpp
===================================================================
--- lib/Frontend/FrontendOptions.cpp
+++ lib/Frontend/FrontendOptions.cpp
@@ -6,6 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "clang/Basic/LangStandard.h"
 #include "clang/Frontend/FrontendOptions.h"
 #include "llvm/ADT/StringSwitch.h"
 
@@ -13,22 +14,22 @@
 
 InputKind FrontendOptions::getInputKindForExtension(StringRef Extension) {
   return llvm::StringSwitch<InputKind>(Extension)
-    .Cases("ast", "pcm", InputKind(InputKind::Unknown, InputKind::Precompiled))
-    .Case("c", InputKind::C)
-    .Cases("S", "s", InputKind::Asm)
-    .Case("i", InputKind(InputKind::C).getPreprocessed())
-    .Case("ii", InputKind(InputKind::CXX).getPreprocessed())
-    .Case("cui", InputKind(InputKind::CUDA).getPreprocessed())
-    .Case("m", InputKind::ObjC)
-    .Case("mi", InputKind(InputKind::ObjC).getPreprocessed())
-    .Cases("mm", "M", InputKind::ObjCXX)
-    .Case("mii", InputKind(InputKind::ObjCXX).getPreprocessed())
-    .Cases("C", "cc", "cp", InputKind::CXX)
-    .Cases("cpp", "CPP", "c++", "cxx", "hpp", InputKind::CXX)
-    .Case("cppm", InputKind::CXX)
-    .Case("iim", InputKind(InputKind::CXX).getPreprocessed())
-    .Case("cl", InputKind::OpenCL)
-    .Case("cu", InputKind::CUDA)
-    .Cases("ll", "bc", InputKind::LLVM_IR)
-    .Default(InputKind::Unknown);
+    .Cases("ast", "pcm", InputKind(Unknown, InputKind::Precompiled))
+    .Case("c", C)
+    .Cases("S", "s", Asm)
+    .Case("i", InputKind(C).getPreprocessed())
+    .Case("ii", InputKind(CXX).getPreprocessed())
+    .Case("cui", InputKind(CUDA).getPreprocessed())
+    .Case("m", ObjC)
+    .Case("mi", InputKind(ObjC).getPreprocessed())
+    .Cases("mm", "M", ObjCXX)
+    .Case("mii", InputKind(ObjCXX).getPreprocessed())
+    .Cases("C", "cc", "cp", CXX)
+    .Cases("cpp", "CPP", "c++", "cxx", "hpp", CXX)
+    .Case("cppm", CXX)
+    .Case("iim", InputKind(CXX).getPreprocessed())
+    .Case("cl", OpenCL)
+    .Case("cu", CUDA)
+    .Cases("ll", "bc", LLVM_IR)
+    .Default(Unknown);
 }
Index: lib/Frontend/PrecompiledPreamble.cpp
===================================================================
--- lib/Frontend/PrecompiledPreamble.cpp
+++ lib/Frontend/PrecompiledPreamble.cpp
@@ -12,6 +12,7 @@
 
 #include "clang/Frontend/PrecompiledPreamble.h"
 #include "clang/AST/DeclObjC.h"
+#include "clang/Basic/LangStandard.h"
 #include "clang/Basic/TargetInfo.h"
 #include "clang/Frontend/CompilerInstance.h"
 #include "clang/Frontend/CompilerInvocation.h"
@@ -303,7 +304,7 @@
       Clang->getFrontendOpts().Inputs[0].getKind().getFormat() !=
           InputKind::Source ||
       Clang->getFrontendOpts().Inputs[0].getKind().getLanguage() ==
-          InputKind::LLVM_IR) {
+          LLVM_IR) {
     return BuildPreambleError::BadInputs;
   }
 
Index: lib/Frontend/Rewrite/FrontendActions.cpp
===================================================================
--- lib/Frontend/Rewrite/FrontendActions.cpp
+++ lib/Frontend/Rewrite/FrontendActions.cpp
@@ -9,6 +9,7 @@
 #include "clang/Rewrite/Frontend/FrontendActions.h"
 #include "clang/AST/ASTConsumer.h"
 #include "clang/Basic/CharInfo.h"
+#include "clang/Basic/LangStandard.h"
 #include "clang/Config/config.h"
 #include "clang/Frontend/CompilerInstance.h"
 #include "clang/Frontend/FrontendActions.h"
@@ -250,7 +251,7 @@
     Instance.getFrontendOpts().DisableFree = false;
     Instance.getFrontendOpts().Inputs.clear();
     Instance.getFrontendOpts().Inputs.emplace_back(
-        Filename, InputKind(InputKind::Unknown, InputKind::Precompiled));
+        Filename, InputKind(Unknown, InputKind::Precompiled));
     Instance.getFrontendOpts().ModuleFiles.clear();
     Instance.getFrontendOpts().ModuleMapFiles.clear();
     // Don't recursively rewrite imports. We handle them all at the top level.
Index: lib/StaticAnalyzer/Frontend/ModelInjector.cpp
===================================================================
--- lib/StaticAnalyzer/Frontend/ModelInjector.cpp
+++ lib/StaticAnalyzer/Frontend/ModelInjector.cpp
@@ -9,6 +9,7 @@
 #include "ModelInjector.h"
 #include "clang/AST/Decl.h"
 #include "clang/Basic/IdentifierTable.h"
+#include "clang/Basic/LangStandard.h"
 #include "clang/Basic/Stack.h"
 #include "clang/Frontend/ASTUnit.h"
 #include "clang/Frontend/CompilerInstance.h"
@@ -65,7 +66,7 @@
   auto Invocation = std::make_shared<CompilerInvocation>(CI.getInvocation());
 
   FrontendOptions &FrontendOpts = Invocation->getFrontendOpts();
-  InputKind IK = InputKind::CXX; // FIXME
+  InputKind IK = CXX; // FIXME
   FrontendOpts.Inputs.clear();
   FrontendOpts.Inputs.emplace_back(fileName, IK);
   FrontendOpts.DisableFree = true;
Index: lib/Tooling/InterpolatingCompilationDatabase.cpp
===================================================================
--- lib/Tooling/InterpolatingCompilationDatabase.cpp
+++ lib/Tooling/InterpolatingCompilationDatabase.cpp
@@ -42,9 +42,9 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "clang/Basic/LangStandard.h"
 #include "clang/Driver/Options.h"
 #include "clang/Driver/Types.h"
-#include "clang/Frontend/LangStandard.h"
 #include "clang/Tooling/CompilationDatabase.h"
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/Optional.h"
@@ -249,15 +249,15 @@
   }
 
   // Map the language from the --std flag to that of the -x flag.
-  static types::ID toType(InputKind::Language Lang) {
+  static types::ID toType(Language Lang) {
     switch (Lang) {
-    case InputKind::C:
+    case C:
       return types::TY_C;
-    case InputKind::CXX:
+    case CXX:
       return types::TY_CXX;
-    case InputKind::ObjC:
+    case ObjC:
       return types::TY_ObjC;
-    case InputKind::ObjCXX:
+    case ObjCXX:
       return types::TY_ObjCXX;
     default:
       return types::TY_INVALID;
@@ -297,15 +297,8 @@
   // Try to interpret the argument as '-std='.
   Optional<LangStandard::Kind> tryParseStdArg(const llvm::opt::Arg &Arg) {
     using namespace driver::options;
-    if (Arg.getOption().matches(ClangCLMode ? OPT__SLASH_std : OPT_std_EQ)) {
-      return llvm::StringSwitch<LangStandard::Kind>(Arg.getValue())
-#define LANGSTANDARD(id, name, lang, ...) .Case(name, LangStandard::lang_##id)
-#define LANGSTANDARD_ALIAS(id, alias) .Case(alias, LangStandard::lang_##id)
-#include "clang/Frontend/LangStandards.def"
-#undef LANGSTANDARD_ALIAS
-#undef LANGSTANDARD
-                 .Default(LangStandard::lang_unspecified);
-    }
+    if (Arg.getOption().matches(ClangCLMode ? OPT__SLASH_std : OPT_std_EQ))
+      return LangStandard::getLangKind(Arg.getValue());
     return None;
   }
 };
Index: unittests/Frontend/CodeGenActionTest.cpp
===================================================================
--- unittests/Frontend/CodeGenActionTest.cpp
+++ unittests/Frontend/CodeGenActionTest.cpp
@@ -10,6 +10,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "clang/Basic/LangStandard.h"
 #include "clang/CodeGen/BackendUtil.h"
 #include "clang/CodeGen/CodeGenAction.h"
 #include "clang/Frontend/CompilerInstance.h"
@@ -45,7 +46,7 @@
       "test.cc",
       MemoryBuffer::getMemBuffer("").release());
   Invocation->getFrontendOpts().Inputs.push_back(
-      FrontendInputFile("test.cc", InputKind::CXX));
+      FrontendInputFile("test.cc", CXX));
   Invocation->getFrontendOpts().ProgramAction = EmitLLVM;
   Invocation->getTargetOpts().Triple = "i386-unknown-linux-gnu";
   CompilerInstance Compiler;
Index: unittests/Frontend/FrontendActionTest.cpp
===================================================================
--- unittests/Frontend/FrontendActionTest.cpp
+++ unittests/Frontend/FrontendActionTest.cpp
@@ -10,6 +10,7 @@
 #include "clang/AST/ASTConsumer.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/RecursiveASTVisitor.h"
+#include "clang/Basic/LangStandard.h"
 #include "clang/Frontend/CompilerInstance.h"
 #include "clang/Frontend/CompilerInvocation.h"
 #include "clang/Frontend/FrontendActions.h"
@@ -84,7 +85,7 @@
       "test.cc",
       MemoryBuffer::getMemBuffer("int main() { float x; }").release());
   invocation->getFrontendOpts().Inputs.push_back(
-      FrontendInputFile("test.cc", InputKind::CXX));
+      FrontendInputFile("test.cc", CXX));
   invocation->getFrontendOpts().ProgramAction = frontend::ParseSyntaxOnly;
   invocation->getTargetOpts().Triple = "i386-unknown-linux-gnu";
   CompilerInstance compiler;
@@ -104,7 +105,7 @@
       "test.cc",
       MemoryBuffer::getMemBuffer("int main() { float x; }").release());
   invocation->getFrontendOpts().Inputs.push_back(
-      FrontendInputFile("test.cc", InputKind::CXX));
+      FrontendInputFile("test.cc", CXX));
   invocation->getFrontendOpts().ProgramAction = frontend::ParseSyntaxOnly;
   invocation->getTargetOpts().Triple = "i386-unknown-linux-gnu";
   CompilerInstance compiler;
@@ -131,7 +132,7 @@
       "};\n"
       "B<char> c() { return B<char>(); }\n").release());
   invocation->getFrontendOpts().Inputs.push_back(
-      FrontendInputFile("test.cc", InputKind::CXX));
+      FrontendInputFile("test.cc", CXX));
   invocation->getFrontendOpts().ProgramAction = frontend::ParseSyntaxOnly;
   invocation->getTargetOpts().Triple = "i386-unknown-linux-gnu";
   CompilerInstance compiler;
@@ -177,7 +178,7 @@
       "test.cc",
       MemoryBuffer::getMemBuffer("int main() { float x; }").release());
   Invocation->getFrontendOpts().Inputs.push_back(
-      FrontendInputFile("test.cc", InputKind::CXX));
+      FrontendInputFile("test.cc", CXX));
   Invocation->getFrontendOpts().ProgramAction = frontend::ParseSyntaxOnly;
   Invocation->getTargetOpts().Triple = "i386-unknown-linux-gnu";
   CompilerInstance Compiler;
@@ -238,7 +239,7 @@
                                             "int main() { foo(); }")
                      .release());
   Invocation->getFrontendOpts().Inputs.push_back(
-      FrontendInputFile("test.cc", InputKind::CXX));
+      FrontendInputFile("test.cc", CXX));
   Invocation->getFrontendOpts().ProgramAction = frontend::ParseSyntaxOnly;
   Invocation->getTargetOpts().Triple = "i386-unknown-linux-gnu";
   CompilerInstance Compiler;
@@ -270,7 +271,7 @@
         "test.h",
         MemoryBuffer::getMemBuffer("int foo(void) { return 1; }\n").release());
     Invocation->getFrontendOpts().Inputs.push_back(
-        FrontendInputFile("test.h", InputKind::C));
+        FrontendInputFile("test.h", C));
     Invocation->getFrontendOpts().OutputFile = StringRef(PCHFilename);
     Invocation->getFrontendOpts().ProgramAction = frontend::GeneratePCH;
     Invocation->getTargetOpts().Triple = "x86_64-apple-darwin19.0.0";
Index: unittests/Frontend/OutputStreamTest.cpp
===================================================================
--- unittests/Frontend/OutputStreamTest.cpp
+++ unittests/Frontend/OutputStreamTest.cpp
@@ -6,6 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "clang/Basic/LangStandard.h"
 #include "clang/CodeGen/BackendUtil.h"
 #include "clang/CodeGen/CodeGenAction.h"
 #include "clang/Frontend/CompilerInstance.h"
@@ -24,7 +25,7 @@
   Invocation->getPreprocessorOpts().addRemappedFile(
       "test.cc", MemoryBuffer::getMemBuffer("").release());
   Invocation->getFrontendOpts().Inputs.push_back(
-      FrontendInputFile("test.cc", InputKind::CXX));
+      FrontendInputFile("test.cc", CXX));
   Invocation->getFrontendOpts().ProgramAction = EmitBC;
   Invocation->getTargetOpts().Triple = "i386-unknown-linux-gnu";
   CompilerInstance Compiler;