[clang] [clang] Implement statement printer for EmbedExpr (PR #117770)

Mariya Podchishchaeva via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 27 04:14:21 PST 2024


================
@@ -3902,6 +3902,8 @@ void Preprocessor::HandleEmbedDirectiveImpl(
   }
 
   EmbedAnnotationData *Data = new (BP) EmbedAnnotationData;
+  Data->Filename = Filename;
+  Data->IsAngled = IsAngled;
   Data->BinaryData = BinaryContents;
----------------
Fznamznon wrote:

None that I can think of... I don't think it would've helped though since I don't think the bump allocator calls the destructors.
I think we need to find a good place to store filename strings that come from embed directives. @AaronBallman any chance you have a good ideas about where can we store the filename string to manage the memory in a good way?

https://github.com/llvm/llvm-project/pull/117770


More information about the cfe-commits mailing list