This is a follow-up patch to https://reviews.llvm.org/D150221. It extends -fkeep-persistent-storage-variables to cover compiler generated artifacts—including the symbols for temporaries bound to references with persistent storage and guard variables.
Question:
The guard variables are created in each derived CXXABI class (namely ItaniumCXXABI and MicrosoftCXXABI). Hence, they are emitted after their creation accordingly in this patch. I'm not sure if there is a common place to emit them for all CXXABIs outside the derived CXXABI classes. Any suggestions would be appreciated.