[PATCH] D122760: [OpenMP] Add OpenMP variant extension to keep the unmangled name

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 5 12:40:10 PDT 2022

jhuber6 marked an inline comment as done.
jhuber6 added inline comments.

Comment at: clang/lib/CodeGen/CodeGenModule.cpp:3062
+    if (auto *A = Global->getAttr<OMPDeclareVariantNoMangleAttr>())
+      VariantGlobalsEmitted.insert(A->getFunction());
jdoerfert wrote:
> This looks like you now disable the diagnostic for pretty much everything, no?
This should only get called if we plan to emit this global, if the global has the attribute stating that it should not be mangled we're basically just asserting that its associated non-variant declaration should not be found. So even if we hit a name mangling conflict, as long as we haven't tried to emit that global we should be fine. I can add a test for this.

  rG LLVM Github Monorepo



More information about the cfe-commits mailing list