Commit 1aff68c
committed
[lldb] Fix lookup of types in anonymous namespaces with -gsimple-template-names
Anonymous namespaces are supposed to be optional when looking up types.
This was not working in combination with -gsimple-template-names,
because the way it was constructing the complete (with template args)
name scope (i.e., by generating thescope as a string and then reparsing
it) did not preserve the information about the scope kinds.
Essentially what the code wants here is to call `GetTypeLookupContext`
(that's the function used to get the context in the "regular" code
path), but to embelish each name with the template arguments (if they
don't have them already). This PR implements exactly that by adding an
argument to control which kind of names are we interested in. This
should also make the lookup faster as it avoids parsing of the long
string, but I haven't attempted to benchmark that.
I believe this function can also be used in some other places where
we're manually appending template names, but I'm leaving that for
another patch.1 parent 7201cae commit 1aff68c
File tree
5 files changed
+65
-30
lines changed- lldb
- source/Plugins/SymbolFile/DWARF
- test/API/lang/cpp/nested-template
5 files changed
+65
-30
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
376 | 378 | | |
377 | 379 | | |
378 | 380 | | |
379 | | - | |
| 381 | + | |
| 382 | + | |
380 | 383 | | |
381 | 384 | | |
382 | 385 | | |
| |||
386 | 389 | | |
387 | 390 | | |
388 | 391 | | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | 392 | | |
395 | 393 | | |
396 | 394 | | |
| |||
401 | 399 | | |
402 | 400 | | |
403 | 401 | | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
404 | 418 | | |
405 | 419 | | |
406 | 420 | | |
407 | 421 | | |
408 | 422 | | |
409 | | - | |
| 423 | + | |
410 | 424 | | |
411 | 425 | | |
412 | 426 | | |
| |||
428 | 442 | | |
429 | 443 | | |
430 | 444 | | |
431 | | - | |
| 445 | + | |
432 | 446 | | |
433 | 447 | | |
434 | 448 | | |
| |||
438 | 452 | | |
439 | 453 | | |
440 | 454 | | |
441 | | - | |
| 455 | + | |
| 456 | + | |
442 | 457 | | |
443 | 458 | | |
444 | | - | |
| 459 | + | |
445 | 460 | | |
446 | 461 | | |
447 | 462 | | |
448 | 463 | | |
449 | | - | |
| 464 | + | |
450 | 465 | | |
451 | 466 | | |
452 | 467 | | |
| |||
461 | 476 | | |
462 | 477 | | |
463 | 478 | | |
464 | | - | |
| 479 | + | |
465 | 480 | | |
466 | 481 | | |
467 | 482 | | |
| |||
484 | 499 | | |
485 | 500 | | |
486 | 501 | | |
487 | | - | |
| 502 | + | |
| 503 | + | |
488 | 504 | | |
489 | 505 | | |
490 | | - | |
| 506 | + | |
491 | 507 | | |
492 | 508 | | |
493 | 509 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
77 | 85 | | |
78 | 86 | | |
79 | 87 | | |
| |||
85 | 93 | | |
86 | 94 | | |
87 | 95 | | |
88 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
89 | 105 | | |
90 | 106 | | |
91 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | 14 | | |
16 | | - | |
17 | 15 | | |
18 | 16 | | |
19 | 17 | | |
| |||
2740 | 2738 | | |
2741 | 2739 | | |
2742 | 2740 | | |
2743 | | - | |
2744 | | - | |
2745 | | - | |
2746 | | - | |
2747 | | - | |
2748 | | - | |
2749 | | - | |
2750 | | - | |
2751 | | - | |
2752 | | - | |
2753 | | - | |
2754 | | - | |
| 2741 | + | |
| 2742 | + | |
| 2743 | + | |
| 2744 | + | |
| 2745 | + | |
2755 | 2746 | | |
2756 | 2747 | | |
2757 | 2748 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
20 | 25 | | |
21 | 26 | | |
22 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
8 | 14 | | |
9 | 15 | | |
| 16 | + | |
10 | 17 | | |
0 commit comments