[PATCH] D76184: [OpenMP][NFC] Remove the need to include `OpenMPClause.h`

2020-04-01 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment.
Herald added a subscriber: yaxunl.

@rnk What is the plan for this one now? Should I abandon it?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76184/new/

https://reviews.llvm.org/D76184



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D76184: [OpenMP][NFC] Remove the need to include `OpenMPClause.h`

2020-04-02 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment.

In D76184#1956352 , @jdoerfert wrote:

> @rnk What is the plan for this one now? Should I abandon it?


Sorry, I got distracted. I tried reapplying it but it didn't apply cleanly. 
It's possible I hadn't locally applied your patch series correctly when I said 
it wasn't compiling. If you can get clang (and clangd and clang-tools-extra) to 
compile with your change, feel free to push.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76184/new/

https://reviews.llvm.org/D76184



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D76184: [OpenMP][NFC] Remove the need to include `OpenMPClause.h`

2020-04-03 Thread Reid Kleckner via Phabricator via cfe-commits
rnk updated this revision to Diff 254889.
rnk added a comment.
Herald added subscribers: usaxena95, kadircet, arphaman, jkorous.

- seems to build all..


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76184/new/

https://reviews.llvm.org/D76184

Files:
  clang-tools-extra/clangd/XRefs.cpp
  clang/include/clang/AST/Attr.h
  clang/include/clang/AST/OpenMPClause.h
  clang/include/clang/Basic/OpenMPKinds.h
  clang/include/clang/Parse/Parser.h
  clang/include/clang/Sema/Sema.h
  clang/lib/AST/AttrImpl.cpp
  clang/lib/AST/OpenMPClause.cpp
  clang/lib/Parse/ParseOpenMP.cpp
  clang/lib/Sema/SemaOpenMP.cpp
  clang/lib/Serialization/ASTReader.cpp
  clang/lib/Serialization/ASTWriter.cpp

Index: clang/lib/Serialization/ASTWriter.cpp
===
--- clang/lib/Serialization/ASTWriter.cpp
+++ clang/lib/Serialization/ASTWriter.cpp
@@ -6403,7 +6403,7 @@
   Record.push_back(C->getTotalComponentListNum());
   Record.push_back(C->getTotalComponentsNum());
   Record.AddSourceLocation(C->getLParenLoc());
-  for (unsigned I = 0; I < OMPMapClause::NumberOfModifiers; ++I) {
+  for (unsigned I = 0; I < NumberOfOMPMapClauseModifiers; ++I) {
 Record.push_back(C->getMapTypeModifier(I));
 Record.AddSourceLocation(C->getMapTypeModifierLoc(I));
   }
Index: clang/lib/Serialization/ASTReader.cpp
===
--- clang/lib/Serialization/ASTReader.cpp
+++ clang/lib/Serialization/ASTReader.cpp
@@ -12335,7 +12335,7 @@
 
 void OMPClauseReader::VisitOMPMapClause(OMPMapClause *C) {
   C->setLParenLoc(Record.readSourceLocation());
-  for (unsigned I = 0; I < OMPMapClause::NumberOfModifiers; ++I) {
+  for (unsigned I = 0; I < NumberOfOMPMapClauseModifiers; ++I) {
 C->setMapTypeModifier(
 I, static_cast(Record.readInt()));
 C->setMapTypeModifierLoc(I, Record.readSourceLocation());
Index: clang/lib/Sema/SemaOpenMP.cpp
===
--- clang/lib/Sema/SemaOpenMP.cpp
+++ clang/lib/Sema/SemaOpenMP.cpp
@@ -35,6 +35,8 @@
 #include "llvm/ADT/PointerEmbeddedInt.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/Frontend/OpenMP/OMPConstants.h"
+#include 
+
 using namespace clang;
 using namespace llvm::omp;
 
@@ -5543,6 +5545,9 @@
   FD->setParams(Params);
 }
 
+Sema::OMPDeclareVariantScope::OMPDeclareVariantScope(OMPTraitInfo &TI)
+: TI(&TI), NameSuffix(TI.getMangledName()) {}
+
 FunctionDecl *
 Sema::ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope(Scope *S,
 Declarator &D) {
@@ -17054,7 +17059,7 @@
   OpenMPMapModifierKind Modifiers[] = {OMPC_MAP_MODIFIER_unknown,
OMPC_MAP_MODIFIER_unknown,
OMPC_MAP_MODIFIER_unknown};
-  SourceLocation ModifiersLoc[OMPMapClause::NumberOfModifiers];
+  SourceLocation ModifiersLoc[NumberOfOMPMapClauseModifiers];
 
   // Process map-type-modifiers, flag errors for duplicate modifiers.
   unsigned Count = 0;
@@ -17064,7 +17069,7 @@
   Diag(MapTypeModifiersLoc[I], diag::err_omp_duplicate_map_type_modifier);
   continue;
 }
-assert(Count < OMPMapClause::NumberOfModifiers &&
+assert(Count < NumberOfOMPMapClauseModifiers &&
"Modifiers exceed the allowed number of map type modifiers");
 Modifiers[Count] = MapTypeModifiers[I];
 ModifiersLoc[Count] = MapTypeModifiersLoc[I];
Index: clang/lib/Parse/ParseOpenMP.cpp
===
--- clang/lib/Parse/ParseOpenMP.cpp
+++ clang/lib/Parse/ParseOpenMP.cpp
@@ -11,6 +11,7 @@
 //===--===//
 
 #include "clang/AST/ASTContext.h"
+#include "clang/AST/OpenMPClause.h"
 #include "clang/AST/StmtOpenMP.h"
 #include "clang/Basic/OpenMPKinds.h"
 #include "clang/Basic/TargetInfo.h"
@@ -865,7 +866,7 @@
 } // namespace
 
 void Parser::parseOMPTraitPropertyKind(
-OMPTraitInfo::OMPTraitProperty &TIProperty, llvm::omp::TraitSet Set,
+OMPTraitProperty &TIProperty, llvm::omp::TraitSet Set,
 llvm::omp::TraitSelector Selector, llvm::StringMap &Seen) {
   TIProperty.Kind = TraitProperty::invalid;
 
@@ -934,14 +935,14 @@
   << CONTEXT_TRAIT_LVL << listOpenMPContextTraitProperties(Set, Selector);
 }
 
-void Parser::parseOMPContextProperty(OMPTraitInfo::OMPTraitSelector &TISelector,
+void Parser::parseOMPContextProperty(OMPTraitSelector &TISelector,
  llvm::omp::TraitSet Set,
  llvm::StringMap &Seen) {
   assert(TISelector.Kind != TraitSelector::user_condition &&
  "User conditions are special properties not handled here!");
 
   SourceLocation PropertyLoc = Tok.getLocation();
-  OMPTraitInfo::OMPTraitProperty TIProperty;
+  OMPTraitProperty TIProperty;
   parseOMPTraitPropertyKi

[PATCH] D76184: [OpenMP][NFC] Remove the need to include `OpenMPClause.h`

2020-04-03 Thread Reid Kleckner via Phabricator via cfe-commits
rnk commandeered this revision.
rnk edited reviewers, added: jdoerfert; removed: rnk.
rnk added a comment.
This revision now requires review to proceed.

I got it building...


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76184/new/

https://reviews.llvm.org/D76184



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D76184: [OpenMP][NFC] Remove the need to include `OpenMPClause.h`

2020-04-03 Thread Reid Kleckner via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs 
Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rGba1ffd25c1f7: [OpenMP][NFC] Remove the need to include 
`OpenMPClause.h` (authored by rnk).

Changed prior to commit:
  https://reviews.llvm.org/D76184?vs=254889&id=254904#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76184/new/

https://reviews.llvm.org/D76184

Files:
  clang-tools-extra/clangd/XRefs.cpp
  clang/include/clang/AST/Attr.h
  clang/include/clang/AST/OpenMPClause.h
  clang/include/clang/Basic/OpenMPKinds.h
  clang/include/clang/Parse/Parser.h
  clang/include/clang/Sema/Sema.h
  clang/lib/AST/AttrImpl.cpp
  clang/lib/AST/OpenMPClause.cpp
  clang/lib/Parse/ParseOpenMP.cpp
  clang/lib/Sema/SemaOpenMP.cpp
  clang/lib/Serialization/ASTReader.cpp
  clang/lib/Serialization/ASTWriter.cpp
  clang/lib/Tooling/Transformer/SourceCode.cpp

Index: clang/lib/Tooling/Transformer/SourceCode.cpp
===
--- clang/lib/Tooling/Transformer/SourceCode.cpp
+++ clang/lib/Tooling/Transformer/SourceCode.cpp
@@ -20,6 +20,7 @@
 #include "clang/Basic/SourceManager.h"
 #include "clang/Lex/Lexer.h"
 #include "llvm/Support/Errc.h"
+#include 
 
 using namespace clang;
 
Index: clang/lib/Serialization/ASTWriter.cpp
===
--- clang/lib/Serialization/ASTWriter.cpp
+++ clang/lib/Serialization/ASTWriter.cpp
@@ -6403,7 +6403,7 @@
   Record.push_back(C->getTotalComponentListNum());
   Record.push_back(C->getTotalComponentsNum());
   Record.AddSourceLocation(C->getLParenLoc());
-  for (unsigned I = 0; I < OMPMapClause::NumberOfModifiers; ++I) {
+  for (unsigned I = 0; I < NumberOfOMPMapClauseModifiers; ++I) {
 Record.push_back(C->getMapTypeModifier(I));
 Record.AddSourceLocation(C->getMapTypeModifierLoc(I));
   }
Index: clang/lib/Serialization/ASTReader.cpp
===
--- clang/lib/Serialization/ASTReader.cpp
+++ clang/lib/Serialization/ASTReader.cpp
@@ -12335,7 +12335,7 @@
 
 void OMPClauseReader::VisitOMPMapClause(OMPMapClause *C) {
   C->setLParenLoc(Record.readSourceLocation());
-  for (unsigned I = 0; I < OMPMapClause::NumberOfModifiers; ++I) {
+  for (unsigned I = 0; I < NumberOfOMPMapClauseModifiers; ++I) {
 C->setMapTypeModifier(
 I, static_cast(Record.readInt()));
 C->setMapTypeModifierLoc(I, Record.readSourceLocation());
Index: clang/lib/Sema/SemaOpenMP.cpp
===
--- clang/lib/Sema/SemaOpenMP.cpp
+++ clang/lib/Sema/SemaOpenMP.cpp
@@ -35,6 +35,8 @@
 #include "llvm/ADT/PointerEmbeddedInt.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/Frontend/OpenMP/OMPConstants.h"
+#include 
+
 using namespace clang;
 using namespace llvm::omp;
 
@@ -5543,6 +5545,9 @@
   FD->setParams(Params);
 }
 
+Sema::OMPDeclareVariantScope::OMPDeclareVariantScope(OMPTraitInfo &TI)
+: TI(&TI), NameSuffix(TI.getMangledName()) {}
+
 FunctionDecl *
 Sema::ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope(Scope *S,
 Declarator &D) {
@@ -17054,7 +17059,7 @@
   OpenMPMapModifierKind Modifiers[] = {OMPC_MAP_MODIFIER_unknown,
OMPC_MAP_MODIFIER_unknown,
OMPC_MAP_MODIFIER_unknown};
-  SourceLocation ModifiersLoc[OMPMapClause::NumberOfModifiers];
+  SourceLocation ModifiersLoc[NumberOfOMPMapClauseModifiers];
 
   // Process map-type-modifiers, flag errors for duplicate modifiers.
   unsigned Count = 0;
@@ -17064,7 +17069,7 @@
   Diag(MapTypeModifiersLoc[I], diag::err_omp_duplicate_map_type_modifier);
   continue;
 }
-assert(Count < OMPMapClause::NumberOfModifiers &&
+assert(Count < NumberOfOMPMapClauseModifiers &&
"Modifiers exceed the allowed number of map type modifiers");
 Modifiers[Count] = MapTypeModifiers[I];
 ModifiersLoc[Count] = MapTypeModifiersLoc[I];
Index: clang/lib/Parse/ParseOpenMP.cpp
===
--- clang/lib/Parse/ParseOpenMP.cpp
+++ clang/lib/Parse/ParseOpenMP.cpp
@@ -11,6 +11,7 @@
 //===--===//
 
 #include "clang/AST/ASTContext.h"
+#include "clang/AST/OpenMPClause.h"
 #include "clang/AST/StmtOpenMP.h"
 #include "clang/Basic/OpenMPKinds.h"
 #include "clang/Basic/TargetInfo.h"
@@ -865,7 +866,7 @@
 } // namespace
 
 void Parser::parseOMPTraitPropertyKind(
-OMPTraitInfo::OMPTraitProperty &TIProperty, llvm::omp::TraitSet Set,
+OMPTraitProperty &TIProperty, llvm::omp::TraitSet Set,
 llvm::omp::TraitSelector Selector, llvm::StringMap &Seen) {
   TIProperty.Kind = TraitProperty::invalid;
 
@@ -934,14 +935,14 @@
   << CONTEXT_TRAIT_LVL <

[PATCH] D76184: [OpenMP][NFC] Remove the need to include `OpenMPClause.h`

2020-03-14 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision.
jdoerfert added a reviewer: rnk.
Herald added subscribers: guansong, bollu.
Herald added a project: clang.

See rational here: https://reviews.llvm.org/D76173#1922916


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D76184

Files:
  clang/include/clang/AST/Attr.h
  clang/include/clang/AST/OpenMPClause.h
  clang/include/clang/Parse/Parser.h
  clang/lib/AST/OpenMPClause.cpp
  clang/lib/Parse/ParseOpenMP.cpp

Index: clang/lib/Parse/ParseOpenMP.cpp
===
--- clang/lib/Parse/ParseOpenMP.cpp
+++ clang/lib/Parse/ParseOpenMP.cpp
@@ -11,6 +11,7 @@
 //===--===//
 
 #include "clang/AST/ASTContext.h"
+#include "clang/AST/OpenMPClause.h"
 #include "clang/AST/StmtOpenMP.h"
 #include "clang/Basic/OpenMPKinds.h"
 #include "clang/Parse/ParseDiagnostic.h"
@@ -862,7 +863,7 @@
 } // namespace
 
 void Parser::parseOMPTraitPropertyKind(
-OMPTraitInfo::OMPTraitProperty &TIProperty, llvm::omp::TraitSet Set,
+OMPTraitProperty &TIProperty, llvm::omp::TraitSet Set,
 llvm::omp::TraitSelector Selector, llvm::StringMap &Seen) {
   TIProperty.Kind = TraitProperty::invalid;
 
@@ -931,14 +932,14 @@
   << CONTEXT_TRAIT_LVL << listOpenMPContextTraitProperties(Set, Selector);
 }
 
-void Parser::parseOMPContextProperty(OMPTraitInfo::OMPTraitSelector &TISelector,
+void Parser::parseOMPContextProperty(OMPTraitSelector &TISelector,
  llvm::omp::TraitSet Set,
  llvm::StringMap &Seen) {
   assert(TISelector.Kind != TraitSelector::user_condition &&
  "User conditions are special properties not handled here!");
 
   SourceLocation PropertyLoc = Tok.getLocation();
-  OMPTraitInfo::OMPTraitProperty TIProperty;
+  OMPTraitProperty TIProperty;
   parseOMPTraitPropertyKind(TIProperty, Set, TISelector.Kind, Seen);
 
   // If we have an invalid property here we already issued a warning.
@@ -972,7 +973,7 @@
 }
 
 void Parser::parseOMPTraitSelectorKind(
-OMPTraitInfo::OMPTraitSelector &TISelector, llvm::omp::TraitSet Set,
+OMPTraitSelector &TISelector, llvm::omp::TraitSet Set,
 llvm::StringMap &Seen) {
   TISelector.Kind = TraitSelector::invalid;
 
@@ -1051,7 +1052,7 @@
 ///
 ///  ['('[]  [, ]* ')']
 void Parser::parseOMPContextSelector(
-OMPTraitInfo::OMPTraitSelector &TISelector, llvm::omp::TraitSet Set,
+OMPTraitSelector &TISelector, llvm::omp::TraitSet Set,
 llvm::StringMap &SeenSelectors) {
   unsigned short OuterPC = ParenCount;
 
@@ -1151,7 +1152,7 @@
   BDT.consumeClose();
 }
 
-void Parser::parseOMPTraitSetKind(OMPTraitInfo::OMPTraitSet &TISet,
+void Parser::parseOMPTraitSetKind(OMPTraitSet &TISet,
   llvm::StringMap &Seen) {
   TISet.Kind = TraitSet::invalid;
 
@@ -1215,7 +1216,7 @@
 ///
 ///  '=' '{'  [, ]* '}'
 void Parser::parseOMPContextSelectorSet(
-OMPTraitInfo::OMPTraitSet &TISet,
+OMPTraitSet &TISet,
 llvm::StringMap &SeenSets) {
   auto OuterBC = BraceCount;
 
@@ -1270,7 +1271,7 @@
 
   llvm::StringMap SeenSelectors;
   do {
-OMPTraitInfo::OMPTraitSelector TISelector;
+OMPTraitSelector TISelector;
 parseOMPContextSelector(TISelector, TISet.Kind, SeenSelectors);
 if (TISelector.Kind != TraitSelector::invalid &&
 !TISelector.Properties.empty())
@@ -1292,10 +1293,10 @@
 /// Parse OpenMP context selectors:
 ///
 ///  [, ]*
-bool Parser::parseOMPContextSelectors(SourceLocation Loc, OMPTraitInfo &TI) {
+bool Parser::parseOMPContextSelectors(SourceLocation Loc, OMPTraitInfo& TI) {
   llvm::StringMap SeenSets;
   do {
-OMPTraitInfo::OMPTraitSet TISet;
+OMPTraitSet TISet;
 parseOMPContextSelectorSet(TISet, SeenSets);
 if (TISet.Kind != TraitSet::invalid && !TISet.Selectors.empty())
   TI.Sets.push_back(TISet);
Index: clang/lib/AST/OpenMPClause.cpp
===
--- clang/lib/AST/OpenMPClause.cpp
+++ clang/lib/AST/OpenMPClause.cpp
@@ -1841,14 +1841,14 @@
 void OMPTraitInfo::print(llvm::raw_ostream &OS,
  const PrintingPolicy &Policy) const {
   bool FirstSet = true;
-  for (const OMPTraitInfo::OMPTraitSet &Set : Sets) {
+  for (const OMPTraitSet &Set : Sets) {
 if (!FirstSet)
   OS << ", ";
 FirstSet = false;
 OS << llvm::omp::getOpenMPContextTraitSetName(Set.Kind) << "={";
 
 bool FirstSelector = true;
-for (const OMPTraitInfo::OMPTraitSelector &Selector : Set.Selectors) {
+for (const OMPTraitSelector &Selector : Set.Selectors) {
   if (!FirstSelector)
 OS << ", ";
   FirstSelector = false;
@@ -1874,7 +1874,7 @@
 }
 
 bool FirstProperty = true;
-for (const OMPTraitInfo::OMPTraitProperty &Property :
+for (const OMPTraitProperty &Property :
  Selector.Properties) {
   if (!FirstProperty)
   

[PATCH] D76184: [OpenMP][NFC] Remove the need to include `OpenMPClause.h`

2020-03-14 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 250396.
jdoerfert added a comment.

Finish changes


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76184/new/

https://reviews.llvm.org/D76184

Files:
  clang/include/clang/AST/Attr.h
  clang/include/clang/AST/OpenMPClause.h
  clang/include/clang/Basic/OpenMPKinds.h
  clang/include/clang/Parse/Parser.h
  clang/include/clang/Sema/Sema.h
  clang/lib/AST/AttrImpl.cpp
  clang/lib/AST/OpenMPClause.cpp
  clang/lib/Parse/ParseOpenMP.cpp
  clang/lib/Sema/SemaOpenMP.cpp
  clang/lib/Serialization/ASTReader.cpp
  clang/lib/Serialization/ASTWriter.cpp

Index: clang/lib/Serialization/ASTWriter.cpp
===
--- clang/lib/Serialization/ASTWriter.cpp
+++ clang/lib/Serialization/ASTWriter.cpp
@@ -6381,7 +6381,7 @@
   Record.push_back(C->getTotalComponentListNum());
   Record.push_back(C->getTotalComponentsNum());
   Record.AddSourceLocation(C->getLParenLoc());
-  for (unsigned I = 0; I < OMPMapClause::NumberOfModifiers; ++I) {
+  for (unsigned I = 0; I < NumberOfOMPMapClauseModifiers; ++I) {
 Record.push_back(C->getMapTypeModifier(I));
 Record.AddSourceLocation(C->getMapTypeModifierLoc(I));
   }
Index: clang/lib/Serialization/ASTReader.cpp
===
--- clang/lib/Serialization/ASTReader.cpp
+++ clang/lib/Serialization/ASTReader.cpp
@@ -12292,7 +12292,7 @@
 
 void OMPClauseReader::VisitOMPMapClause(OMPMapClause *C) {
   C->setLParenLoc(Record.readSourceLocation());
-  for (unsigned I = 0; I < OMPMapClause::NumberOfModifiers; ++I) {
+  for (unsigned I = 0; I < NumberOfOMPMapClauseModifiers; ++I) {
 C->setMapTypeModifier(
 I, static_cast(Record.readInt()));
 C->setMapTypeModifierLoc(I, Record.readSourceLocation());
Index: clang/lib/Sema/SemaOpenMP.cpp
===
--- clang/lib/Sema/SemaOpenMP.cpp
+++ clang/lib/Sema/SemaOpenMP.cpp
@@ -16641,7 +16641,7 @@
   OpenMPMapModifierKind Modifiers[] = {OMPC_MAP_MODIFIER_unknown,
OMPC_MAP_MODIFIER_unknown,
OMPC_MAP_MODIFIER_unknown};
-  SourceLocation ModifiersLoc[OMPMapClause::NumberOfModifiers];
+  SourceLocation ModifiersLoc[NumberOfOMPMapClauseModifiers];
 
   // Process map-type-modifiers, flag errors for duplicate modifiers.
   unsigned Count = 0;
@@ -16651,7 +16651,7 @@
   Diag(MapTypeModifiersLoc[I], diag::err_omp_duplicate_map_type_modifier);
   continue;
 }
-assert(Count < OMPMapClause::NumberOfModifiers &&
+assert(Count < NumberOfOMPMapClauseModifiers &&
"Modifiers exceed the allowed number of map type modifiers");
 Modifiers[Count] = MapTypeModifiers[I];
 ModifiersLoc[Count] = MapTypeModifiersLoc[I];
Index: clang/lib/Parse/ParseOpenMP.cpp
===
--- clang/lib/Parse/ParseOpenMP.cpp
+++ clang/lib/Parse/ParseOpenMP.cpp
@@ -11,6 +11,7 @@
 //===--===//
 
 #include "clang/AST/ASTContext.h"
+#include "clang/AST/OpenMPClause.h"
 #include "clang/AST/StmtOpenMP.h"
 #include "clang/Basic/OpenMPKinds.h"
 #include "clang/Parse/ParseDiagnostic.h"
@@ -862,7 +863,7 @@
 } // namespace
 
 void Parser::parseOMPTraitPropertyKind(
-OMPTraitInfo::OMPTraitProperty &TIProperty, llvm::omp::TraitSet Set,
+OMPTraitProperty &TIProperty, llvm::omp::TraitSet Set,
 llvm::omp::TraitSelector Selector, llvm::StringMap &Seen) {
   TIProperty.Kind = TraitProperty::invalid;
 
@@ -931,14 +932,14 @@
   << CONTEXT_TRAIT_LVL << listOpenMPContextTraitProperties(Set, Selector);
 }
 
-void Parser::parseOMPContextProperty(OMPTraitInfo::OMPTraitSelector &TISelector,
+void Parser::parseOMPContextProperty(OMPTraitSelector &TISelector,
  llvm::omp::TraitSet Set,
  llvm::StringMap &Seen) {
   assert(TISelector.Kind != TraitSelector::user_condition &&
  "User conditions are special properties not handled here!");
 
   SourceLocation PropertyLoc = Tok.getLocation();
-  OMPTraitInfo::OMPTraitProperty TIProperty;
+  OMPTraitProperty TIProperty;
   parseOMPTraitPropertyKind(TIProperty, Set, TISelector.Kind, Seen);
 
   // If we have an invalid property here we already issued a warning.
@@ -972,7 +973,7 @@
 }
 
 void Parser::parseOMPTraitSelectorKind(
-OMPTraitInfo::OMPTraitSelector &TISelector, llvm::omp::TraitSet Set,
+OMPTraitSelector &TISelector, llvm::omp::TraitSet Set,
 llvm::StringMap &Seen) {
   TISelector.Kind = TraitSelector::invalid;
 
@@ -1051,7 +1052,7 @@
 ///
 ///  ['('[]  [, ]* ')']
 void Parser::parseOMPContextSelector(
-OMPTraitInfo::OMPTraitSelector &TISelector, llvm::omp::TraitSet Set,
+OMPTraitSelector &TISelector, llvm::omp::TraitSet Set,
 llvm::StringMap &SeenSelector

[PATCH] D76184: [OpenMP][NFC] Remove the need to include `OpenMPClause.h`

2020-03-16 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

lgtm, thanks!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76184/new/

https://reviews.llvm.org/D76184



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D76184: [OpenMP][NFC] Remove the need to include `OpenMPClause.h`

2020-03-17 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment.

I patched this in with it's dependency, and to compile just Attr.h by itself, 
it reduces the time from ~2.420s to ~1.920s, so it is worth pushing this 
through. :)

However, I noticed that there are still some targets broken by the removal of 
the SmallSet.h include. I'm happy to push that through if you want to hand it 
off.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76184/new/

https://reviews.llvm.org/D76184



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D76184: [OpenMP][NFC] Remove the need to include `OpenMPClause.h`

2020-03-23 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment.

In D76184#1927159 , @rnk wrote:

> I patched this in with it's dependency, and to compile just Attr.h by itself, 
> it reduces the time from ~2.420s to ~1.920s, so it is worth pushing this 
> through. :)
>
> However, I noticed that there are still some targets broken by the removal of 
> the SmallSet.h include. I'm happy to push that through if you want to hand it 
> off.


I was about to push all three changes but I wans't aware of broken targets. Thx 
for telling me. I would not mind you talking over this patch. I'll merge the 
other two in a bit.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76184/new/

https://reviews.llvm.org/D76184



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D76184: [OpenMP][NFC] Remove the need to include `OpenMPClause.h`

2020-03-23 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment.

In D76184#1927159 , @rnk wrote:

> I patched this in with it's dependency, and to compile just Attr.h by itself, 
> it reduces the time from ~2.420s to ~1.920s, so it is worth pushing this 
> through. :)
>
> However, I noticed that there are still some targets broken by the removal of 
> the SmallSet.h include. I'm happy to push that through if you want to hand it 
> off.


I was about to push all three changes but I wans't aware of broken targets. Thx 
for telling me. I would not mind you talking over this patch. I'll merged the 
other two.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76184/new/

https://reviews.llvm.org/D76184



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits