ABataev added inline comments.
================ Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:2592-2593 llvm::raw_svector_ostream OS(PtrName); - OS << CGM.getMangledName(GlobalDecl(VD)) << "_decl_tgt_ref_ptr"; + unsigned DeviceID, Line; + unsigned FileID = 0; + OS << CGM.getMangledName(GlobalDecl(VD)); ---------------- Move those 3 vars to `if` statement, they are not needed here. ================ Comment at: test/OpenMP/declare_target_link_codegen.cpp:22-23 +// HOST-DAG: @c_decl_tgt_ref_ptr = weak global i32* @c +// HOST-DAG: @_{{.*}}d = internal global i32 2 +// HOST-DAG: @_{{.*}}d_{{.*}}_decl_tgt_ref_ptr = weak global i32* @_{{.*}}d // DEVICE-NOT: @c = ---------------- Better to define the variable with the name of the original `d` variable for better and stable check Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64592/new/ https://reviews.llvm.org/D64592 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits