diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-04-28 18:00:46 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-04-28 18:00:46 +0000 |
commit | 274f4334f6dd35239e5c3d4b86198f7f5804b059 (patch) | |
tree | 89b8aaf651311823ff8e0a1b7bae37fa59166c0d /include/clang | |
parent | ff871444421ad9fb8e7ddb73bc422912d9b0ee53 (diff) |
Bug fix in CFG::getBlockEdgeImpl(): Use a BumpPtrAllocator to allocate
std::pair<CFGBlock*, CFGBlock*> that have an 8-byte alignment for use with
ProgramPoint. This fixes a bug reported by Argiris where using std::set<> on
Windows would result in a 4-byte alignment, not an 8-byte alignment.
Fixes: <rdar://problem/5892265>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50364 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r-- | include/clang/AST/CFG.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/clang/AST/CFG.h b/include/clang/AST/CFG.h index 2cc3c6279e..162240ab1f 100644 --- a/include/clang/AST/CFG.h +++ b/include/clang/AST/CFG.h @@ -281,7 +281,7 @@ public: //===--------------------------------------------------------------------===// CFG() : Entry(NULL), Exit(NULL), IndirectGotoBlock(NULL), NumBlockIDs(0), - BlkExprMap(NULL), BlkEdgeSet(NULL) {}; + BlkExprMap(NULL), BlkEdgeSet(NULL), Allocator(NULL) {}; ~CFG(); @@ -298,13 +298,16 @@ private: // block-level expressions and their "statement number" in the CFG. void* BlkExprMap; - /// BlkEdgeSet - An opaque pointer to prevent inclusion of <set>. + /// BlkEdgeSet - An opaque pointer to prevent inclusion of FoldingSet.h. /// The set contains std::pair<CFGBlock*,CFGBlock*> objects that have /// stable references for use by the 'BlockEdge' class. This set is intended /// to be sparse, as it only contains edges whether both the source /// and destination block have multiple successors/predecessors. void* BlkEdgeSet; + /// Alloc - An internal allocator used for BlkEdgeSet. + void* Allocator; + friend class BlockEdge; /// getBlockEdgeImpl - Utility method used by the class BlockEdge. The CFG |