Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OpenMP][FIX] Remove AssertingVHs that outlive their values
The map with AssertingVHs has been moved into the OpenMPIRBuilder which extended their lifetime. On NVIDIA this will cause an assertion. This simply removes the AssertingVH wrapper.
- Loading branch information
Showing
2 changed files
with
12 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// REQUIRES: nvptx-registered-target | ||
// | ||
// Test target codegen - host bc file has to be created first. | ||
// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm-bc %s -o %t-ppc-host.bc | ||
// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple nvptx64-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o %t.final | ||
// expected-no-diagnostics | ||
|
||
#pragma omp begin declare target | ||
constexpr int A[] = {1,2,3,4,5}; | ||
int f(int i) { return A[i]; } | ||
#pragma omp end declare target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters