[PATCH] D42168: [OpenMP] Generate unique name for offloading entries

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 17 08:16:47 PST 2018


ABataev added a comment.

1. Please, mark the record as packed.
2. Tests



================
Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:3576-3577
   EntryInit.addInt(CGM.Int32Ty, 0);
-  llvm::GlobalVariable *Entry =
-    EntryInit.finishAndCreateGlobal(".omp_offloading.entry",
-                                    Align,
-                                    /*constant*/ true,
-                                    llvm::GlobalValue::ExternalLinkage);
+  SmallString<128> EntryGblName(".omp_offloading.entry.");
+  EntryGblName += Name;
+  llvm::GlobalVariable *Entry = EntryInit.finishAndCreateGlobal(
----------------
Use `llvm::Twine` here instead.


Repository:
  rC Clang

https://reviews.llvm.org/D42168





More information about the cfe-commits mailing list