Openmp parallel iterator improvements (#9493)
* More flexibility in OpenMP pragma * Use static to constrain to compile-time annotation string * Update changelog with OpenMP change
This commit is contained in:
parent
c844a9169c
commit
5b97762787
4 changed files with 13 additions and 8 deletions
|
|
@ -2041,11 +2041,6 @@ proc semMagic(c: PContext, n: PNode, s: PSym, flags: TExprFlags): PNode =
|
|||
result = c.graph.emptyNode
|
||||
of mOmpParFor:
|
||||
checkMinSonsLen(n, 3, c.config)
|
||||
if n.sonsLen == 4:
|
||||
let annotationStr = getConstExpr(c.module, semExpr(c, n[^1]), c.graph)
|
||||
if annotationStr == nil or annotationStr.kind notin nkStrKinds:
|
||||
localError(c.config, result[^1].info,
|
||||
"The annotation string for `||` must be known at compile time")
|
||||
result = semDirectOp(c, n, flags)
|
||||
else:
|
||||
result = semDirectOp(c, n, flags)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue