================
@@ -4065,8 +4065,40 @@ void CodeGenModule::EmitGlobal(GlobalDecl GD) {
 
   // If this is an alias definition (which otherwise looks like a declaration)
   // emit it now.
-  if (Global->hasAttr<AliasAttr>())
+  if (Global->hasAttr<AliasAttr>()) {
+    if (LangOpts.OpenMPIsTargetDevice || LangOpts.CUDA) {
+      const auto *AA = Global->getAttr<AliasAttr>();
+      assert(AA && "Not an alias?");
----------------
Jason-VanBeusekom wrote:

Removed 
in:[16c1a68](https://github.com/llvm/llvm-project/pull/164326/commits/16c1a6888b87644f24c07a75c067d9e25eb1ac3e)

I copied this from `EmitAliasDefinition` which does not check with 
`Global->hasAttr<AliasAttr>()`

https://github.com/llvm/llvm-project/pull/164326
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to