mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
Write and read metadata attachments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82259 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -22,6 +22,7 @@ namespace llvm {
|
||||
|
||||
class Type;
|
||||
class Value;
|
||||
class Instruction;
|
||||
class BasicBlock;
|
||||
class Function;
|
||||
class Module;
|
||||
@ -47,11 +48,15 @@ private:
|
||||
ValueList Values;
|
||||
ValueList MDValues;
|
||||
ValueMapType MDValueMap;
|
||||
|
||||
|
||||
typedef DenseMap<void*, unsigned> AttributeMapType;
|
||||
AttributeMapType AttributeMap;
|
||||
std::vector<AttrListPtr> Attributes;
|
||||
|
||||
typedef DenseMap<const Instruction*, unsigned> InstructionMapType;
|
||||
InstructionMapType InstructionMap;
|
||||
unsigned InstructionCount;
|
||||
|
||||
/// BasicBlocks - This contains all the basic blocks for the currently
|
||||
/// incorporated function. Their reverse mapping is stored in ValueMap.
|
||||
std::vector<const BasicBlock*> BasicBlocks;
|
||||
@ -74,7 +79,10 @@ public:
|
||||
assert(I != TypeMap.end() && "Type not in ValueEnumerator!");
|
||||
return I->second-1;
|
||||
}
|
||||
|
||||
|
||||
unsigned getInstructionID(const Instruction *I) const;
|
||||
void setInstructionID(const Instruction *I);
|
||||
|
||||
unsigned getAttributeID(const AttrListPtr &PAL) const {
|
||||
if (PAL.isEmpty()) return 0; // Null maps to zero.
|
||||
AttributeMapType::const_iterator I = AttributeMap.find(PAL.getRawPointer());
|
||||
|
Reference in New Issue
Block a user