aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorFlorian Hahn <flo@fhahn.com>2020-12-17 12:59:02 +0000
committerFlorian Hahn <flo@fhahn.com>2020-12-17 13:27:43 +0000
commit29077ae860bcf3c9e9f2ce67ca7dfe691b6fa148 (patch)
tree549432ffb1d7e42a02d644e131dfaaa484470775 /clang/lib/CodeGen/CodeGenModule.cpp
parentdeae7e982a3b08996455e2cdfdc5062bf37895a3 (diff)
downloadllvm-29077ae860bcf3c9e9f2ce67ca7dfe691b6fa148.zip
llvm-29077ae860bcf3c9e9f2ce67ca7dfe691b6fa148.tar.gz
llvm-29077ae860bcf3c9e9f2ce67ca7dfe691b6fa148.tar.bz2
[IRBuilder] Generalize debug loc handling for arbitrary metadata.
This patch extends IRBuilder to allow adding/preserving arbitrary metadata on created instructions. Instead of using references to specific metadata nodes (like DebugLoc), IRbuilder now keeps a vector of (metadata kind, MDNode *) pairs, which are added to each created instruction. The patch itself is a NFC and only moves the existing debug location handling over to the new system. In a follow-up patch it will be used to preserve !annotation metadata besides !dbg. The current approach requires iterating over MetadataToCopy to avoid adding duplicates, but given that the number of metadata kinds to copy/preserve is going to be very small initially (0, 1 (for !dbg) or 2 (!dbg and !annotation)) that should not matter. Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D93400
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions