* 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. llvm-svn: 2436
This commit is contained in:
parent
624fe0b0ba
commit
18489fb61f
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue