diff options
author | Pavel Labath <pavel@labath.sk> | 2024-11-15 12:24:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-15 12:24:12 +0100 |
commit | 10b048c8922d746b14e991f468e00b3ca67c9d95 (patch) | |
tree | 51b2f7f3ebe0b43f85945e300233c8d5a76e9053 /llvm/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp | |
parent | 56720a47bb421c487d33aabad86e44e7cf2790bf (diff) | |
download | llvm-10b048c8922d746b14e991f468e00b3ca67c9d95.zip llvm-10b048c8922d746b14e991f468e00b3ca67c9d95.tar.gz llvm-10b048c8922d746b14e991f468e00b3ca67c9d95.tar.bz2 |
[lldb] Make CompilerDecl::GetName (always) return template args (#116068)
I ran into this while look at a different bug (patch coming soon). This
function has only two callers. The first is SBTypeStaticField::GetName
(which doesn't care about templates), and the other is
CompilerDecl::GetCompilerContext (in the TypeQuery constructor), which
does want template arguments.
This function was (normally) returning the name without template args.
Since this code is only used when looking up a type in another shared
library, the odds of running into this bug are relatively low, but I add
a test to demonstrate the scenario and the fix for it nonetheless.
Amazingly (and scarily), this test actually passes without this change
in the default configuration -- and only fails with
-gsimple-template-names. The reason for that is that in the
non-simplified case we create a regular CXXRecordDecl whose name is
"bar<int>" (instead of a template record "foo" with an argument of
"int"). When evaluating the expression, we are somehow able to replace
this with a proper template specialization decl.
Diffstat (limited to 'llvm/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp')
0 files changed, 0 insertions, 0 deletions