IR: Extract set logic from Instruction attachments, NFC
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 24 Apr 2015 20:36:25 +0000 (20:36 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 24 Apr 2015 20:36:25 +0000 (20:36 +0000)
commit223d9cfd301cb6f34b66ae9bb18c38250d78dca7
tree3489ede4d8b2c126192a84dc013ebdbb6aeeea42
parent39789f81ab330a5582919b2edb592d2a63f6c663
IR: Extract set logic from Instruction attachments, NFC

Extract the set logic for metadata attachments from `Instruction` so it
can be reused for `Function` (PR23340).

This data structure makes a `SmallVector<>` look (a little) like a map,
just doing the bare minimum to support the `Instruction` (and soon,
`Function`) metadata API.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235769 91177308-0d34-0410-b5e6-96231b3b80d8
lib/IR/LLVMContextImpl.h
lib/IR/Metadata.cpp