[llvm] [clang] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX (PR #67999)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 31 11:25:31 PDT 2023


================
@@ -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();
----------------
efriedma-quic wrote:

getName()?

https://github.com/llvm/llvm-project/pull/67999


More information about the llvm-commits mailing list