Commit cdad183
authored
[clang] Fix #embed "fast path" (#121479)
When a single #embed directive is used to initialize a char array, the
case is optimized via swap of EmbedExpr to underlying StringLiteral,
resulting in better performance in AST consumers.
While browsing through the code, I realized that
7122b70
which changed type of EmbedExpr made the "fast path" unreachable. This
patch fixes this unfortunate situation.1 parent ad192f9 commit cdad183
2 files changed
+3
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2030 | 2030 | | |
2031 | 2031 | | |
2032 | 2032 | | |
2033 | | - | |
2034 | | - | |
2035 | | - | |
2036 | | - | |
2037 | | - | |
2038 | | - | |
2039 | | - | |
| 2033 | + | |
| 2034 | + | |
2040 | 2035 | | |
2041 | 2036 | | |
2042 | 2037 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
0 commit comments