raghavendhra marked 2 inline comments as done. raghavendhra added inline comments.
================ Comment at: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:4914 + GVMode->setVisibility(llvm::GlobalVariable::ProtectedVisibility); + assert(!GVMode->isDeclaration() && + "Only globals with definition can force usage."); ---------------- jplehr wrote: > Can this assertion ever be not be met? I'm just curious, given that you > create that `GVMode` yourself. Adopted this assert from Clang Codegen addCompilerUsedGlobal() which is called inside setPropertyExecutionMode() in CGOpenMPRuntimeGPU.cpp Actual definition of addCompilerusedGlobal() in CodeGenModule.cpp void CodeGenModule::addCompilerUsedGlobal(llvm::GlobalValue *GV) { assert(!GV->isDeclaration() && "Only globals with definition can force usage."); LLVMCompilerUsed.emplace_back(GV); } Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155794/new/ https://reviews.llvm.org/D155794 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits