Fix bug exposed by this testcase:

declare int "call_operand"      (%rtx_def*, int)        ;; Prototype for: call_operand
declare int "restore_operand"   (%rtx_def*, int)        ;; Prototype for: restore_operand

%rtx_def = type opaque
%rtx_def = type int
implementation


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@934 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2001-10-22 04:55:44 +00:00
parent c9a21b51a1
commit 9245fc75a4
2 changed files with 30 additions and 9 deletions

View File

@@ -62,7 +62,7 @@ public:
// insert - Add named definition to the symbol table...
inline void insert(Value *N) {
assert(N->hasName() && "Value must be named to go into symbol table!");
insertEntry(N->getName(), N);
insertEntry(N->getName(), N->getType(), N);
}
// insert - Insert a constant or type into the symbol table with the specified
@@ -72,7 +72,7 @@ public:
inline void insert(const string &Name, Value *V) {
assert((isa<Type>(V) || isa<ConstPoolVal>(V)) &&
"Can only insert types and constants here!");
insertEntry(Name, V);
insertEntry(Name, V->getType(), V);
}
void remove(Value *N);
@@ -111,7 +111,7 @@ private:
// insertEntry - Insert a value into the symbol table with the specified
// name...
//
void insertEntry(const string &Name, Value *V);
void insertEntry(const string &Name, const Type *Ty, Value *V);
// This function is called when one of the types in the type plane are refined
virtual void refineAbstractType(const DerivedType *OldTy, const Type *NewTy);