From 2298981669bf3bd63335a4be179bc0f96823a8f4 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Tue, 20 Aug 2019 20:50:49 +0000 Subject: Vendor import of stripped clang trunk r366426 (just before the release_90 branch point): https://llvm.org/svn/llvm-project/cfe/trunk@366426 --- lib/Basic/IdentifierTable.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'lib/Basic/IdentifierTable.cpp') diff --git a/lib/Basic/IdentifierTable.cpp b/lib/Basic/IdentifierTable.cpp index b961c8333bd7..ca9c71287ab7 100644 --- a/lib/Basic/IdentifierTable.cpp +++ b/lib/Basic/IdentifierTable.cpp @@ -1,9 +1,8 @@ //===- IdentifierTable.cpp - Hash table for identifier lookup -------------===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // @@ -100,6 +99,7 @@ namespace { KEYMODULES = 0x100000, KEYCXX2A = 0x200000, KEYOPENCLCXX = 0x400000, + KEYMSCOMPAT = 0x800000, KEYALLCXX = KEYCXX | KEYCXX11 | KEYCXX2A, KEYALL = (0xffffff & ~KEYNOMS18 & ~KEYNOOPENCL) // KEYNOMS18 and KEYNOOPENCL are used to exclude. @@ -126,6 +126,7 @@ static KeywordStatus getKeywordStatus(const LangOptions &LangOpts, if (LangOpts.C99 && (Flags & KEYC99)) return KS_Enabled; if (LangOpts.GNUKeywords && (Flags & KEYGNU)) return KS_Extension; if (LangOpts.MicrosoftExt && (Flags & KEYMS)) return KS_Extension; + if (LangOpts.MSVCCompat && (Flags & KEYMSCOMPAT)) return KS_Enabled; if (LangOpts.Borland && (Flags & KEYBORLAND)) return KS_Extension; if (LangOpts.Bool && (Flags & BOOLSUPPORT)) return KS_Enabled; if (LangOpts.Half && (Flags & HALFSUPPORT)) return KS_Enabled; @@ -142,7 +143,7 @@ static KeywordStatus getKeywordStatus(const LangOptions &LangOpts, // in non-arc mode. if (LangOpts.ObjC && (Flags & KEYOBJC)) return KS_Enabled; if (LangOpts.ConceptsTS && (Flags & KEYCONCEPTS)) return KS_Enabled; - if (LangOpts.CoroutinesTS && (Flags & KEYCOROUTINES)) return KS_Enabled; + if (LangOpts.Coroutines && (Flags & KEYCOROUTINES)) return KS_Enabled; if (LangOpts.ModulesTS && (Flags & KEYMODULES)) return KS_Enabled; if (LangOpts.CPlusPlus && (Flags & KEYALLCXX)) return KS_Future; return KS_Disabled; @@ -217,7 +218,7 @@ void IdentifierTable::AddKeywords(const LangOptions &LangOpts) { if (LangOpts.DeclSpecKeyword) AddKeyword("__declspec", tok::kw___declspec, KEYALL, LangOpts, *this); - // Add the '_experimental_modules_import' contextual keyword. + // Add the 'import' contextual keyword. get("import").setModulesImport(true); } -- cgit v1.2.3