Open
Description
I merged #68620 this morning. However there are several places to improve the implementation. This issue is to track them as well as for further discussion on the matter.
To be done:
- Look close into serialization code for
EmbedExpr
. Right now the storage will be duplicated if twoEmbedExpr
referencing same data are serialized. Context ✨ [Sema, Lex, Parse] Preprocessor embed in C and C++ (and Obj-C and Obj-C++ by-proxy) #68620 (comment) - Transform
tok::annot_embed
into a bunch of tokens and inject them back into stream. We might need a new kind of token that directly hold a numerical value. Context ✨ [Sema, Lex, Parse] Preprocessor embed in C and C++ (and Obj-C and Obj-C++ by-proxy) #68620 (review) - Solve the issue that we're copying the data if a file is page-sized. Ideas ✨ [Sema, Lex, Parse] Preprocessor embed in C and C++ (and Obj-C and Obj-C++ by-proxy) #68620 (comment) .
- Maybe look more into performance of general case. Current performance diff between "fast" and "slow" case available here ✨ [Sema, Lex, Parse] Preprocessor embed in C and C++ (and Obj-C and Obj-C++ by-proxy) #68620 (comment) .
To be discussed
- Decide how to handle -d, -E options
- if _has_include/__has_embed/__has_c_attribute may appear in the limit parameter argument. Right now accepted, we may need to diagnose that.
- What the default preprocessed output format should be, what options to provide to modify it.
- Decide how to spell base64-input.
Please feel free to edit this if I got something wrong.