Displaying 3 results from an estimated 3 matches for "extra_sections".
2016 Mar 30
2
[PATCH/DRAFT] Embed metadata into object file
...o me the best
solution at that point, since there is already a good infrastructure in
clang.
TranslationUnitDecl
| NamedMetadataAttr implicit llvm.extra_section clang.analysis "Information"
The clang CodeGen then generates a named metadata node on the
llvm::Module level:
!llvm.extra_sections = {!0}
!0 = !{!"clang.analysis", !"Information"}
The attached patch, then takes all key-value pairs from the named
llvm.extra_sections named metadata, and appends them as zero-terminated
strings to the desired section.
I'm not sure, wheter this is the best solution to t...
2016 Mar 30
1
[cfe-dev] [PATCH/DRAFT] Embed metadata into object file
...e there is already a good infrastructure in
> clang.
>
> TranslationUnitDecl
> | NamedMetadataAttr implicit llvm.extra_section clang.analysis "Information"
>
> The clang CodeGen then generates a named metadata node on the
> llvm::Module level:
>
> !llvm.extra_sections = {!0}
> !0 = !{!"clang.analysis", !"Information"}
>
> The attached patch, then takes all key-value pairs from the named
> llvm.extra_sections named metadata, and appends them as zero-terminated
> strings to the desired section.
Depending on your needs, just u...
2016 Apr 01
2
[cfe-dev] [PATCH/DRAFT] Embed metadata into object file
...very
> specifc use case (mine): attaching single strings. I think, furthermore,
> that it would also be handy to materialize and retrieve more complex
> metadata types to/from object files. For example, we could serialize
> LLVM metadata trees into separate sections:
>
> !llvm.extra_sections = {!0}
> !0 = !{!"clang.myanalysis", !1, !2}
> !1 = !{ i32 15, i32 28, i32 142}
> !2 = !{!"key", i32 10000, !"key2", i32 9999}
>
> I'm not sure whether this would be useful and reusable for others. So:
> Do you think this would be useful fo...