[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/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 &Opts, InputKind IK, const char *triple) {
// 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 &Opts, InputKind IK, const char *triple) {
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::getIdentifierTable() {
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();
}