ABataev added inline comments.
================ Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8739 +/// // For each component specified by this mapper: +/// if (currentComponent.hasMapper()) +/// (*currentComponent.Mapper())(rt_mapper_handle, arg_base, arg_begin, ---------------- Currently `currentComponent` is generated by the compiler. But can we instead pass this data as an extra parameter to this `omp_mapper` function. ================ Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8740 +/// if (currentComponent.hasMapper()) +/// (*currentComponent.Mapper())(rt_mapper_handle, arg_base, arg_begin, +/// arg_size, arg_type); ---------------- I don't see this part of logic in the code. Could you show me where is it exactly? ================ Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8785 + std::string Name = getName({"omp_mapper", Ty.getAsString(), D->getName()}); + std::replace(Name.begin(), Name.end(), ' ', '_'); + auto *Fn = llvm::Function::Create(FnTy, llvm::GlobalValue::InternalLinkage, ---------------- Bad idea to do this. Better to use something like this: ``` SmallString<256> TyStr; llvm::raw_svector_ostream Out(TyStr); CGM.getCXXABI().getMangleContext().mangleTypeName(Ty, Out); ``` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59474/new/ https://reviews.llvm.org/D59474 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits