ethteck / splat

A binary splitting tool to assist with decompilation and modding projects
MIT License
154 stars 42 forks source link

Feature Request: Add option to avoid generating template function implementations in files #383

Open weirdbeardgame opened 1 month ago

weirdbeardgame commented 1 month ago

When a Generic Template is used on, Data Structures, Classes Functions etc. The compiler will auto-generate implementations for each type specified IE. Which have matching definitions acrossed several files, etc.

Now that Spimdisasm at least in the dev branch can detect symbol scope meaning symbols can be named the same, I'd like to request a feature that will prevent these implementations from being included as separate functions in these files given they all include the same header. They are simply using or calling the functions, data structures, etc. Some References: https://docs.oracle.com/cd/E19957-01/806-3572/Templates.html

https://stackoverflow.com/questions/19798325/how-does-the-compilation-of-templates-work

https://en.cppreference.com/w/cpp/language/templates

ethteck commented 1 month ago

To rephrase the request as I understand it, a way to tell splat to never emit include_asm for a symbol with a given name would address the concern I think.

I'm not sure how we would accomplish this though. Symbol_addrs is concerned with actual specific symbols, not all symbols that share the same name