mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-11 00:39:36 +00:00
Add a sanity check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20195 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d672ab936f
commit
7a0c775044
@ -1148,6 +1148,7 @@ DSNode *DSGraph::addObjectToGraph(Value *Ptr, bool UseDeclaredType) {
|
||||
assert(isa<PointerType>(Ptr->getType()) && "Ptr is not a pointer!");
|
||||
const Type *Ty = cast<PointerType>(Ptr->getType())->getElementType();
|
||||
DSNode *N = new DSNode(UseDeclaredType ? Ty : 0, this);
|
||||
assert(ScalarMap[Ptr].isNull() && "Object already in this graph!");
|
||||
ScalarMap[Ptr] = N;
|
||||
|
||||
if (GlobalValue *GV = dyn_cast<GlobalValue>(Ptr)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user