PR50767: clear non-distinct debuginfo for function with nodebug definition after...
authorBruno De Fraine <brunodf@synopsys.com>
Tue, 29 Jun 2021 07:46:27 +0000 (09:46 +0200)
committerJeroen Dobbelaere <jeroen.dobbelaere@synopsys.com>
Tue, 29 Jun 2021 08:26:45 +0000 (10:26 +0200)
commit4d8871a898b30f11c905b27954c18d826c0953c9
tree4bdec0465f8ad78e6c103f7ce8844895fb2461a1
parentb8bac6b33c576dec88add0e6a68e96219e278c8a
PR50767: clear non-distinct debuginfo for function with nodebug definition after undecorated declaration

Fix suggested by Yuanfang Chen:

Non-distinct debuginfo is attached to the function due to the undecorated declaration. Later, when seeing the function definition and `nodebug` attribute, the non-distinct debuginfo should be cleared.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D104777
clang/lib/CodeGen/CodeGenFunction.cpp
clang/test/CodeGen/attr-nodebug2.c [new file with mode: 0644]