简体   繁体   中英

Removing metadata from an instruction LLVM

有谁知道如何从LLVM-IR中的指令中删除元数据?

To remove a specifc kind of metadata from an instruction, use setMetadata(kind, NULL) . To remove all the metadata, call getAllMetadata first, then iterate over the kinds in the returned collection and remove them via the first method.

Keep in mind that this will not remove the actual MDNode and will not remove any dbg.declare or dbg.value calls if that's what interests you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM