Skip to content

Commit 206c128

Browse files
committed
Merge branch 'sotoc-issue-33' into 'aurora_offloading_prototype'
Filter out variables which should not be params Closes llvm#33 See merge request NEC-RWTH-Projects/clang!22
2 parents 483c414 + a952ea3 commit 206c128

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

clang/tools/sotoc/src/Visitors.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,11 @@ void FindTargetCodeVisitor::addTargetRegionArgs(
197197
for (const auto i : *FindLoopVisitor.getVarSet()) {
198198
DEBUGP("Iterating var set");
199199
// i->print(llvm::outs());
200+
if (Context.getSourceManager().isBeforeInTranslationUnit(
201+
S->getBeginLoc(),i->getSourceRange().getBegin())) {
202+
tmpSet.insert(i);
203+
continue;
204+
}
200205
for (auto j : *TCR->getOMPClauses()) {
201206
for (auto CC : j->children()) {
202207
if (auto CC_DeclRefExpr =

clang/tools/sotoc/test/arrays/a.out

-811 KB
Binary file not shown.

0 commit comments

Comments
 (0)