Skip to content

Commit 88af970

Browse files
committed
move function to header
1 parent ddc9c86 commit 88af970

File tree

2 files changed

+13
-15
lines changed
  • llvm

2 files changed

+13
-15
lines changed

llvm/include/llvm/Frontend/OpenMP/OMP.h

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,19 @@ bool isCompositeConstruct(Directive D);
3333
bool isCombinedConstruct(Directive D);
3434

3535
/// Can clause C have an iterator-modifier.
36-
bool canHaveIterator(Clause C);
36+
static constexpr inline bool canHaveIterator(Clause C) {
37+
// [5.2:67:5]
38+
switch (C) {
39+
case OMPC_affinity:
40+
case OMPC_depend:
41+
case OMPC_from:
42+
case OMPC_map:
43+
case OMPC_to:
44+
return true;
45+
default:
46+
return false;
47+
}
48+
}
3749

3850
/// Create a nicer version of a function name for humans to look at.
3951
std::string prettifyFunctionName(StringRef FunctionName);

llvm/lib/Frontend/OpenMP/OMP.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -193,20 +193,6 @@ bool isCombinedConstruct(Directive D) {
193193
return !getLeafConstructs(D).empty() && !isCompositeConstruct(D);
194194
}
195195

196-
bool canHaveIterator(Clause C) {
197-
// [5.2:67:5]
198-
switch (C) {
199-
case OMPC_affinity:
200-
case OMPC_depend:
201-
case OMPC_from:
202-
case OMPC_map:
203-
case OMPC_to:
204-
return true;
205-
default:
206-
return false;
207-
}
208-
}
209-
210196
std::string prettifyFunctionName(StringRef FunctionName) {
211197
// Internalized functions have the right name, but simply a suffix.
212198
if (FunctionName.ends_with(".internalized"))

0 commit comments

Comments
 (0)