================
@@ -622,6 +622,28 @@ static bool checkAliasedGlobal(
   return true;
 }
 
+// Emit a warning if toc-data attribute is requested for global variables that
+// have aliases and remove the toc-data attribute.
+static void checkAliasForTocData(llvm::GlobalVariable *GVar,
+                                 const CodeGenOptions &CodeGenOpts,
+                                 DiagnosticsEngine &Diags,
+                                 SourceLocation Location) {
+  if (GVar->hasAttribute("toc-data")) {
+    auto GVId = GVar->getGlobalIdentifier();
----------------
syzaara wrote:

When we support the local linkage variables for toc-data, it will be for the 
option -mtocdata which enables toc-data across the board. The list option 
-mtocdata= is only for variables with external linkage specified using their 
mangled name. So there shouldn't be an issue with searching for the name of 
variables with local linkage.

https://github.com/llvm/llvm-project/pull/67999
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to