Markus =?utf-8?q?Gschoßmann?= <markus.gschossm...@tum.de>,
Markus =?utf-8?q?Gschoßmann?= <markus.gschossm...@tum.de>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/130...@github.com>


================
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -triple x86_64-none-linux-gnu -emit-llvm 
-debug-info-kind=limited %s -o - | FileCheck %s
----------------
mgschossmann wrote:

Thanks for your comment. Indeed, my code changes behavior when compiling for 
i686-pc-windows-msvc, which I did not expect.
However, there seems to be the same problem: There is an implicit parameter 
`should_call_delete`, whose `DILocalVariable` has `arg: 2` even though there is 
no second argument in the function type's `types` array. Similarly to `vtt`, 
the patched code adds this parameter to the array. 

Additionally, it changes the return type of the destructor to a void pointer. I 
am unsure, why this happens, since that does not happen on ItaniumABI. Does the 
MSVC ABI feature an implicit void return? Unfortunately, I am lacking knowledge 
of the MSVC ABI to be able to judge what the correct behavior should be.


Following are clang outputs for `debug-info-vtt.cpp`:
[clang_outputs.zip](https://github.com/user-attachments/files/19509545/clang_outputs.zip)

PS: I am unsure whether the bug is that the AST is not correctly updated in 
`clang/lib/CodeGen/ItaniumCXXABI.cpp` (and 
`clang/lib/CodeGen/MicrosoftCXXABI.cpp`) or that the AST is not correctly read 
in `clang/lib/CodeGen/CGDebugInfo.cpp`. In the former case, my patch feels like 
a workaround.

https://github.com/llvm/llvm-project/pull/130674
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to