================ @@ -5503,11 +5516,17 @@ void CGDebugInfo::EmitGlobalVariable(llvm::GlobalVariable *Var, } AppendAddressSpaceXDeref(AddressSpace, Expr); + llvm::DIExpression *E = nullptr; + if (Expr.empty()) { + if (auto const *InitVal = evaluateConstantInitializer(D)) + E = createConstantValueExpression(D, *InitVal); + } else ---------------- jryans wrote:
I believe code style says this else block should use braces because the if block has them. https://github.com/llvm/llvm-project/pull/72730 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits