[NVPTX][AsmPrinter] Avoid removing globals before calling AsmPrinter::doFinalization()
authorKristina Bessonova <kbessonova@accesssoftek.com>
Sat, 27 Nov 2021 12:02:34 +0000 (14:02 +0200)
committerKristina Bessonova <kbessonova@accesssoftek.com>
Sat, 27 Nov 2021 12:02:34 +0000 (14:02 +0200)
commit9f374a74c2aabed998a731ac9f14bd8baa4208ba
treea491e881203c267575dfa08006242d743bb651ca
parent2b160e95c89f28a30e2481e6131073659d866a8c
[NVPTX][AsmPrinter] Avoid removing globals before calling AsmPrinter::doFinalization()

Instead of removing globals from a module, we, it seems, can just override
AsmPrinter::emitGlobalVariable() to do nothing as NVPTXAsmPrinter already
emitted globals by this time and we don't want to do it twice.

Reviewed By: tra

Differential Revision: https://reviews.llvm.org/D113653
llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
llvm/lib/Target/NVPTX/NVPTXAsmPrinter.h