aboutsummaryrefslogtreecommitdiff
path: root/lib/Bitcode/Writer/ValueEnumerator.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-10-28 05:24:40 +0000
committerChris Lattner <sabre@nondot.org>2009-10-28 05:24:40 +0000
commit837e04a8bf13712a4a8ae279daab65a048b21f7d (patch)
treea37034f61cc5f272d5edfe552b096dccebedd2ce /lib/Bitcode/Writer/ValueEnumerator.h
parent0eeb913aa17a68b1f2963b02ca1d68f09dba0b78 (diff)
bitcode writer support for blockaddress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85376 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode/Writer/ValueEnumerator.h')
-rw-r--r--lib/Bitcode/Writer/ValueEnumerator.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Bitcode/Writer/ValueEnumerator.h b/lib/Bitcode/Writer/ValueEnumerator.h
index da63dde2a2..3c83e35695 100644
--- a/lib/Bitcode/Writer/ValueEnumerator.h
+++ b/lib/Bitcode/Writer/ValueEnumerator.h
@@ -53,6 +53,10 @@ private:
AttributeMapType AttributeMap;
std::vector<AttrListPtr> Attributes;
+ /// GlobalBasicBlockIDs - This map memoizes the basic block ID's referenced by
+ /// the "getGlobalBasicBlockID" method.
+ mutable DenseMap<const BasicBlock*, unsigned> GlobalBasicBlockIDs;
+
typedef DenseMap<const Instruction*, unsigned> InstructionMapType;
InstructionMapType InstructionMap;
unsigned InstructionCount;
@@ -106,6 +110,11 @@ public:
const std::vector<AttrListPtr> &getAttributes() const {
return Attributes;
}
+
+ /// getGlobalBasicBlockID - This returns the function-specific ID for the
+ /// specified basic block. This is relatively expensive information, so it
+ /// should only be used by rare constructs such as address-of-label.
+ unsigned getGlobalBasicBlockID(const BasicBlock *BB) const;
/// incorporateFunction/purgeFunction - If you'd like to deal with a function,
/// use these two methods to get its data into the ValueEnumerator!