* Fix a bug (test/Regression/Assembler/2002-05-02-InvalidForwardRef.ll)

introduced in the 1.66 revision of this file.
* Convert a hard coded constant to a symbolic value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2436 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2002-05-02 19:27:42 +00:00
parent 7dd79b6a62
commit 9705a15b1a

View File

@ -247,7 +247,8 @@ static const Type *getTypeVal(const ValID &D, bool DoNotImprovise = false) {
static Value *lookupInSymbolTable(const Type *Ty, const string &Name) {
SymbolTable *SymTab =
inFunctionScope() ? CurMeth.CurrentFunction->getSymbolTable() : 0;
inFunctionScope() ? CurMeth.CurrentFunction->getSymbolTable() :
CurModule.CurrentModule->getSymbolTable();
return SymTab ? SymTab->lookup(Ty, Name) : 0;
}
@ -402,7 +403,7 @@ static void ResolveDefinitions(vector<ValueList> &LateResolvers,
// resolver table
InsertValue(V, *FutureLateResolvers);
} else {
if (DID.Type == 1)
if (DID.Type == ValID::NameVal)
ThrowException("Reference to an invalid definition: '" +DID.getName()+
"' of type '" + V->getType()->getDescription() + "'",
getLineNumFromPlaceHolder(V));