aboutsummaryrefslogtreecommitdiff
path: root/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
diff options
context:
space:
mode:
authorGeorgiy Samoylov <g.samoylov@syntacore.com>2025-08-01 12:04:39 +0300
committerGitHub <noreply@github.com>2025-08-01 12:04:39 +0300
commitbcbbb2c986e001e9c357df70ed43c9d998ecd6d2 (patch)
tree09d8f53a2b40d51e5e038a4723fc8b11dfafd86b /lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
parent05b16aff0f4d5132799d7d4470ca13db3afe13ae (diff)
downloadllvm-bcbbb2c986e001e9c357df70ed43c9d998ecd6d2.zip
llvm-bcbbb2c986e001e9c357df70ed43c9d998ecd6d2.tar.gz
llvm-bcbbb2c986e001e9c357df70ed43c9d998ecd6d2.tar.bz2
[clang] Fix clang debug info generation for unprtototyped function (#150022)
Consider this declaration: `int foo();` This function is described in LLVM with `clang::FunctionNoProtoType` class. ([See description](https://clang.llvm.org/doxygen/classclang_1_1FunctionNoProtoType.html)) Judging by [this comment](https://github.com/llvm/llvm-project/blob/a1bf0d1394e48894be05d274d3942ff77c35ce87/clang/lib/CodeGen/CGCall.cpp#L159C11-L159C12) all such functions are treated like functions with variadic number of parameters. When we want to [emit debug info](https://github.com/llvm/llvm-project/blob/0a8ddd396546bec7eaa4c3b7ef2f495e52bca0b8/clang/lib/CodeGen/CGDebugInfo.cpp#L4808) we have to know function that we calling. In method [getCalledFunction()](https://github.com/llvm/llvm-project/blob/0a8ddd396546bec7eaa4c3b7ef2f495e52bca0b8/llvm/include/llvm/IR/InstrTypes.h#L1348) we compare two types of function: 1. Function that we deduce from calling operand, and 2. Function that we store locally If they differ we get `nullptr` and can't emit appropriate debug info. The only thing they differ is: lhs function is variadic, but rhs function isn't Reason of this difference is that under RISC-V there is no overridden function that tells us about treating functions with no parameters. [Default function](https://github.com/llvm/llvm-project/blob/0a8ddd396546bec7eaa4c3b7ef2f495e52bca0b8/clang/lib/CodeGen/TargetInfo.cpp#L87) always return `false`. This patch overrides this function for RISC-V
Diffstat (limited to 'lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp')
0 files changed, 0 insertions, 0 deletions