[PATCH] D50218: [OpenMP] Encode offload target triples into comdat key for offload initialization code

Mandeep Singh Grang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 2 20:55:52 PDT 2018

mgrang added a comment.

Please add some unit tests.

Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:3830
+      RegFnNameParts.push_back(Device.getTriple());
+    std::sort(RegFnNameParts.begin() + 2, RegFnNameParts.end());
+    std::string Descriptor = getName(RegFnNameParts);
Please use llvm::sort instead of std::sort. See https://llvm.org/docs/CodingStandards.html#beware-of-non-deterministic-sorting-order-of-equal-elements.

  rC Clang


More information about the cfe-commits mailing list