Make assertions for all addresses passed to ProgramPoint that they have at least an 8-byte alignment.

llvm-svn: 50310
This commit is contained in:
Argyrios Kyrtzidis
2008-04-26 15:19:51 +00:00
parent 67ca6f6347
commit fa2d2f2886
2 changed files with 11 additions and 10 deletions

View File

@@ -19,15 +19,14 @@ using namespace clang;
BlockEdge::BlockEdge(CFG& cfg, const CFGBlock* B1, const CFGBlock* B2) {
if (B1->succ_size() == 1) {
assert (*(B1->succ_begin()) == B2);
Data = reinterpret_cast<uintptr_t>(B1) | BlockEdgeSrcKind;
setRawData(B1, BlockEdgeSrcKind);
}
else if (B2->pred_size() == 1) {
assert (*(B2->pred_begin()) == B1);
Data = reinterpret_cast<uintptr_t>(B2) | BlockEdgeDstKind;
setRawData(B2, BlockEdgeDstKind);
}
else
Data = reinterpret_cast<uintptr_t>(cfg.getBlockEdgeImpl(B1,B2))
| BlockEdgeAuxKind;
setRawData(cfg.getBlockEdgeImpl(B1,B2), BlockEdgeAuxKind);
}
CFGBlock* BlockEdge::getSrc() const {