[PATCH] D137441: [IR] Allow available_externally GlobalAlias

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 4 09:59:07 PDT 2022


nikic added inline comments.


================
Comment at: llvm/lib/IR/Verifier.cpp:820
+    Check(GA.hasAvailableExternallyLinkage() || !GV->isDeclarationForLinker(),
+          "Alias must point to a definition", &GA);
 
----------------
Why is an available_externally alias allowed to point to a declaration?


================
Comment at: llvm/lib/IR/Verifier.cpp:848
+  Check(GlobalAlias::isValidLinkage(GA.getLinkage()) ||
+            GA.hasAvailableExternallyLinkage(),
+        "Alias should have available_externally, private, internal, linkonce, "
----------------
This looks unnecessary, as you adjusted isValidLinkage()?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137441/new/

https://reviews.llvm.org/D137441



More information about the llvm-commits mailing list