Commit 23fd8f6
authored
[lldb][DWARFASTParserClang][NFCI] Simplify ParseChildParameters (llvm#123790)
This patch refactors `ParseChildParameters` in a way which makes it (in
my opinion) more readable, removing some redundant local variables in
the process and reduces the scope of some variables.
**Motivation**
Since `DW_AT_object_pointer`s are now attached to declarations, we can
test for their existence to check whether a C++ method is static or not
(whereas currently we're deducing this from `ParseChildParameters` based
on some heuristics we know are true for most compilers). So my plan is
to move the code for determining `type_quals` and `is_static` out of
`ParseChildParameters`. The refactoring in this PR will make this
follow-up patch hopefully easier to review.
**Testing**
* This should be NFC. The main change is that we now no longer iterate
over `GetAttributes()` but instead retrieve the name, type and
is_artificial attributes of the parameters individually.1 parent 2ee36d4 commit 23fd8f6
File tree
1 file changed
+13
-56
lines changed- lldb/source/Plugins/SymbolFile/DWARF
1 file changed
+13
-56
lines changedLines changed: 13 additions & 56 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3084 | 3084 | | |
3085 | 3085 | | |
3086 | 3086 | | |
3087 | | - | |
3088 | | - | |
3089 | | - | |
3090 | | - | |
3091 | | - | |
3092 | | - | |
3093 | | - | |
3094 | | - | |
3095 | | - | |
3096 | | - | |
3097 | | - | |
3098 | | - | |
3099 | | - | |
3100 | | - | |
3101 | | - | |
3102 | | - | |
3103 | | - | |
3104 | | - | |
3105 | | - | |
3106 | | - | |
3107 | | - | |
3108 | | - | |
3109 | | - | |
3110 | | - | |
3111 | | - | |
3112 | | - | |
3113 | | - | |
3114 | | - | |
3115 | | - | |
3116 | | - | |
3117 | | - | |
3118 | | - | |
3119 | | - | |
3120 | | - | |
3121 | | - | |
3122 | | - | |
3123 | | - | |
3124 | | - | |
3125 | | - | |
3126 | | - | |
3127 | | - | |
3128 | | - | |
| 3087 | + | |
| 3088 | + | |
3129 | 3089 | | |
3130 | | - | |
| 3090 | + | |
3131 | 3091 | | |
3132 | 3092 | | |
3133 | 3093 | | |
| |||
3136 | 3096 | | |
3137 | 3097 | | |
3138 | 3098 | | |
3139 | | - | |
3140 | | - | |
| 3099 | + | |
3141 | 3100 | | |
3142 | 3101 | | |
3143 | 3102 | | |
| |||
3149 | 3108 | | |
3150 | 3109 | | |
3151 | 3110 | | |
3152 | | - | |
3153 | | - | |
3154 | | - | |
3155 | | - | |
| 3111 | + | |
| 3112 | + | |
3156 | 3113 | | |
3157 | | - | |
3158 | | - | |
3159 | | - | |
3160 | | - | |
3161 | | - | |
| 3114 | + | |
| 3115 | + | |
| 3116 | + | |
| 3117 | + | |
| 3118 | + | |
3162 | 3119 | | |
3163 | | - | |
3164 | | - | |
| 3120 | + | |
3165 | 3121 | | |
| 3122 | + | |
3166 | 3123 | | |
3167 | 3124 | | |
3168 | 3125 | | |
| |||
0 commit comments