yaxunl added a comment. Another reason is that we need to support it in rdc mode, where different TU can have static var with the same name. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80858/new/ https://reviews.llvm.org/D80858