[Openmp-commits] [openmp] [llvm] [openmp][wasm] Allow compiling OpenMP to WebAssembly (PR #71297)
Shilei Tian via Openmp-commits
openmp-commits at lists.llvm.org
Sat Nov 4 20:00:18 PDT 2023
================
@@ -4746,10 +4746,13 @@ OpenMPIRBuilder::getOrCreateInternalVariable(Type *Ty, const StringRef &Name,
// variable for possibly changing that to internal or private, or maybe
// create different versions of the function for different OMP internal
// variables.
- auto *GV = new GlobalVariable(
- M, Ty, /*IsConstant=*/false, GlobalValue::CommonLinkage,
- Constant::getNullValue(Ty), Elem.first(),
- /*InsertBefore=*/nullptr, GlobalValue::NotThreadLocal, AddressSpace);
+ auto linkage = this->M.getTargetTriple().rfind("wasm32") == 0
----------------
shiltian wrote:
```suggestion
auto Linkage = this->M.getTargetTriple().rfind("wasm32") == 0
```
https://github.com/llvm/llvm-project/pull/71297
More information about the Openmp-commits
mailing list