[Lldb-commits] [lldb] r367865 - [lldb][clang] Reflect LangStandard.h move to clang/Basic

Rainer Orth via lldb-commits lldb-commits at lists.llvm.org
Mon Aug 5 07:00:43 PDT 2019


Author: ro
Date: Mon Aug  5 07:00:43 2019
New Revision: 367865

URL: http://llvm.org/viewvc/llvm-project?rev=367865&view=rev
Log:
[lldb][clang] Reflect LangStandard.h move to clang/Basic

D65562 <https://reviews.llvm.org/D65562> moves LangStandard.h from clang/Frontend to clang/Basic.  This patch
adjusts the single file in lldb that uses it to match.

Tested on x86_64-pc-linux-gnu.

Differential Revision: https://reviews.llvm.org/D65717

Modified:
    lldb/trunk/source/Symbol/ClangASTContext.cpp

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=367865&r1=367864&r2=367865&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Mon Aug  5 07:00:43 2019
@@ -47,11 +47,11 @@
 #include "clang/Basic/Diagnostic.h"
 #include "clang/Basic/FileManager.h"
 #include "clang/Basic/FileSystemOptions.h"
+#include "clang/Basic/LangStandard.h"
 #include "clang/Basic/SourceManager.h"
 #include "clang/Basic/TargetInfo.h"
 #include "clang/Basic/TargetOptions.h"
 #include "clang/Frontend/FrontendOptions.h"
-#include "clang/Frontend/LangStandard.h"
 #include "clang/Sema/Sema.h"
 
 #ifdef LLDB_DEFINED_NDEBUG_FOR_CLANG
@@ -111,10 +111,10 @@ namespace {
 static inline bool
 ClangASTContextSupportsLanguage(lldb::LanguageType language) {
   return language == eLanguageTypeUnknown || // Clang is the default type system
-         Language::LanguageIsC(language) ||
-         Language::LanguageIsCPlusPlus(language) ||
-         Language::LanguageIsObjC(language) ||
-         Language::LanguageIsPascal(language) ||
+         lldb_private::Language::LanguageIsC(language) ||
+         lldb_private::Language::LanguageIsCPlusPlus(language) ||
+         lldb_private::Language::LanguageIsObjC(language) ||
+         lldb_private::Language::LanguageIsPascal(language) ||
          // Use Clang for Rust until there is a proper language plugin for it
          language == eLanguageTypeRust ||
          language == eLanguageTypeExtRenderScript ||
@@ -571,7 +571,7 @@ static void ParseLangArgs(LangOptions &O
   // Set some properties which depend solely on the input kind; it would be
   // nice to move these to the language standard, and have the driver resolve
   // the input kind + language standard.
-  if (IK.getLanguage() == InputKind::Asm) {
+  if (IK.getLanguage() == clang::Language::Asm) {
     Opts.AsmPreprocessor = 1;
   } else if (IK.isObjectiveC()) {
     Opts.ObjC = 1;
@@ -582,26 +582,26 @@ static void ParseLangArgs(LangOptions &O
   if (LangStd == LangStandard::lang_unspecified) {
     // Based on the base language, pick one.
     switch (IK.getLanguage()) {
-    case InputKind::Unknown:
-    case InputKind::LLVM_IR:
-    case InputKind::RenderScript:
+    case clang::Language::Unknown:
+    case clang::Language::LLVM_IR:
+    case clang::Language::RenderScript:
       llvm_unreachable("Invalid input kind!");
-    case InputKind::OpenCL:
+    case clang::Language::OpenCL:
       LangStd = LangStandard::lang_opencl10;
       break;
-    case InputKind::CUDA:
+    case clang::Language::CUDA:
       LangStd = LangStandard::lang_cuda;
       break;
-    case InputKind::Asm:
-    case InputKind::C:
-    case InputKind::ObjC:
+    case clang::Language::Asm:
+    case clang::Language::C:
+    case clang::Language::ObjC:
       LangStd = LangStandard::lang_gnu99;
       break;
-    case InputKind::CXX:
-    case InputKind::ObjCXX:
+    case clang::Language::CXX:
+    case clang::Language::ObjCXX:
       LangStd = LangStandard::lang_gnucxx98;
       break;
-    case InputKind::HIP:
+    case clang::Language::HIP:
       LangStd = LangStandard::lang_hip;
       break;
     }
@@ -901,8 +901,9 @@ IdentifierTable *ClangASTContext::getIde
 LangOptions *ClangASTContext::getLanguageOptions() {
   if (m_language_options_up == nullptr) {
     m_language_options_up.reset(new LangOptions());
-    ParseLangArgs(*m_language_options_up, InputKind::ObjCXX, GetTargetTriple());
-    //        InitializeLangOptions(*m_language_options_up, InputKind::ObjCXX);
+    ParseLangArgs(*m_language_options_up, clang::Language::ObjCXX,
+                  GetTargetTriple());
+    //        InitializeLangOptions(*m_language_options_up, Language::ObjCXX);
   }
   return m_language_options_up.get();
 }




More information about the lldb-commits mailing list