[llvm] [AsmPrinter] Always emit global equivalents if there is non-global uses (PR #145648)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 25 02:07:49 PDT 2025
================
@@ -2142,16 +2144,20 @@ void AsmPrinter::emitFunctionBody() {
}
/// Compute the number of Global Variables that uses a Constant.
-static unsigned getNumGlobalVariableUses(const Constant *C) {
- if (!C)
+static unsigned getNumGlobalVariableUses(const Constant *C,
+ bool &HasNonGlobalUsers) {
+ if (!C) {
+ HasNonGlobalUsers = true;
return 0;
+ }
----------------
dianqk wrote:
added in https://github.com/llvm/llvm-project/pull/145648/commits/cd85ee4d3e4260ff1d26c026c30c355df377abbb.
https://github.com/llvm/llvm-project/pull/145648
More information about the llvm-commits
mailing list