Fix one strict-aliasing warning.

llvm-svn: 51707
This commit is contained in:
Ted Kremenek 2008-05-29 21:52:26 +00:00
parent 96af4ddb62
commit 5fc6dc070c
1 changed files with 8 additions and 8 deletions

View File

@ -1177,17 +1177,17 @@ typedef llvm::FoldingSet<PersistPairTy> BlkEdgeSetTy;
const std::pair<CFGBlock*,CFGBlock*>*
CFG::getBlockEdgeImpl(const CFGBlock* B1, const CFGBlock* B2) {
llvm::BumpPtrAllocator*& Alloc =
reinterpret_cast<llvm::BumpPtrAllocator*&>(Allocator);
if (!Allocator)
Allocator = new llvm::BumpPtrAllocator();
if (!Alloc)
Alloc = new llvm::BumpPtrAllocator();
llvm::BumpPtrAllocator* Alloc =
static_cast<llvm::BumpPtrAllocator*>(Allocator);
BlkEdgeSetTy*& p = reinterpret_cast<BlkEdgeSetTy*&>(BlkEdgeSet);
if (!BlkEdgeSet)
BlkEdgeSet = new BlkEdgeSetTy();
BlkEdgeSetTy* p = static_cast<BlkEdgeSetTy*>(BlkEdgeSet);
if (!p)
p = new BlkEdgeSetTy();
// Profile the edges.
llvm::FoldingSetNodeID profile;
void* InsertPos;