[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

llvm-svn: 367865
This commit is contained in:
Rainer Orth 2019-08-05 14:00:43 +00:00
parent 09d890d728
commit 6ca1707b23
1 changed files with 20 additions and 19 deletions

View File

@ -47,11 +47,11 @@
#include "clang/Basic/Diagnostic.h" #include "clang/Basic/Diagnostic.h"
#include "clang/Basic/FileManager.h" #include "clang/Basic/FileManager.h"
#include "clang/Basic/FileSystemOptions.h" #include "clang/Basic/FileSystemOptions.h"
#include "clang/Basic/LangStandard.h"
#include "clang/Basic/SourceManager.h" #include "clang/Basic/SourceManager.h"
#include "clang/Basic/TargetInfo.h" #include "clang/Basic/TargetInfo.h"
#include "clang/Basic/TargetOptions.h" #include "clang/Basic/TargetOptions.h"
#include "clang/Frontend/FrontendOptions.h" #include "clang/Frontend/FrontendOptions.h"
#include "clang/Frontend/LangStandard.h"
#include "clang/Sema/Sema.h" #include "clang/Sema/Sema.h"
#ifdef LLDB_DEFINED_NDEBUG_FOR_CLANG #ifdef LLDB_DEFINED_NDEBUG_FOR_CLANG
@ -111,10 +111,10 @@ namespace {
static inline bool static inline bool
ClangASTContextSupportsLanguage(lldb::LanguageType language) { ClangASTContextSupportsLanguage(lldb::LanguageType language) {
return language == eLanguageTypeUnknown || // Clang is the default type system return language == eLanguageTypeUnknown || // Clang is the default type system
Language::LanguageIsC(language) || lldb_private::Language::LanguageIsC(language) ||
Language::LanguageIsCPlusPlus(language) || lldb_private::Language::LanguageIsCPlusPlus(language) ||
Language::LanguageIsObjC(language) || lldb_private::Language::LanguageIsObjC(language) ||
Language::LanguageIsPascal(language) || lldb_private::Language::LanguageIsPascal(language) ||
// Use Clang for Rust until there is a proper language plugin for it // Use Clang for Rust until there is a proper language plugin for it
language == eLanguageTypeRust || language == eLanguageTypeRust ||
language == eLanguageTypeExtRenderScript || language == eLanguageTypeExtRenderScript ||
@ -571,7 +571,7 @@ static void ParseLangArgs(LangOptions &Opts, InputKind IK, const char *triple) {
// Set some properties which depend solely on the input kind; it would be // 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 // nice to move these to the language standard, and have the driver resolve
// the input kind + language standard. // the input kind + language standard.
if (IK.getLanguage() == InputKind::Asm) { if (IK.getLanguage() == clang::Language::Asm) {
Opts.AsmPreprocessor = 1; Opts.AsmPreprocessor = 1;
} else if (IK.isObjectiveC()) { } else if (IK.isObjectiveC()) {
Opts.ObjC = 1; Opts.ObjC = 1;
@ -582,26 +582,26 @@ static void ParseLangArgs(LangOptions &Opts, InputKind IK, const char *triple) {
if (LangStd == LangStandard::lang_unspecified) { if (LangStd == LangStandard::lang_unspecified) {
// Based on the base language, pick one. // Based on the base language, pick one.
switch (IK.getLanguage()) { switch (IK.getLanguage()) {
case InputKind::Unknown: case clang::Language::Unknown:
case InputKind::LLVM_IR: case clang::Language::LLVM_IR:
case InputKind::RenderScript: case clang::Language::RenderScript:
llvm_unreachable("Invalid input kind!"); llvm_unreachable("Invalid input kind!");
case InputKind::OpenCL: case clang::Language::OpenCL:
LangStd = LangStandard::lang_opencl10; LangStd = LangStandard::lang_opencl10;
break; break;
case InputKind::CUDA: case clang::Language::CUDA:
LangStd = LangStandard::lang_cuda; LangStd = LangStandard::lang_cuda;
break; break;
case InputKind::Asm: case clang::Language::Asm:
case InputKind::C: case clang::Language::C:
case InputKind::ObjC: case clang::Language::ObjC:
LangStd = LangStandard::lang_gnu99; LangStd = LangStandard::lang_gnu99;
break; break;
case InputKind::CXX: case clang::Language::CXX:
case InputKind::ObjCXX: case clang::Language::ObjCXX:
LangStd = LangStandard::lang_gnucxx98; LangStd = LangStandard::lang_gnucxx98;
break; break;
case InputKind::HIP: case clang::Language::HIP:
LangStd = LangStandard::lang_hip; LangStd = LangStandard::lang_hip;
break; break;
} }
@ -901,8 +901,9 @@ IdentifierTable *ClangASTContext::getIdentifierTable() {
LangOptions *ClangASTContext::getLanguageOptions() { LangOptions *ClangASTContext::getLanguageOptions() {
if (m_language_options_up == nullptr) { if (m_language_options_up == nullptr) {
m_language_options_up.reset(new LangOptions()); m_language_options_up.reset(new LangOptions());
ParseLangArgs(*m_language_options_up, InputKind::ObjCXX, GetTargetTriple()); ParseLangArgs(*m_language_options_up, clang::Language::ObjCXX,
// InitializeLangOptions(*m_language_options_up, InputKind::ObjCXX); GetTargetTriple());
// InitializeLangOptions(*m_language_options_up, Language::ObjCXX);
} }
return m_language_options_up.get(); return m_language_options_up.get();
} }