Fix newly-introduced 4.3 warnings

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47375 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Anton Korobeynikov
2008-02-20 12:07:57 +00:00
parent 44a2a79f18
commit 4aefd6b7d4
12 changed files with 25 additions and 19 deletions

View File

@@ -578,12 +578,13 @@ static BasicBlock *getBBVal(const ValID &ID) {
} if (ID.Type == ValID::LocalName) {
std::string Name = ID.getName();
Value *N = CurFun.CurrentFunction->getValueSymbolTable().lookup(Name);
if (N)
if (N) {
if (N->getType()->getTypeID() == Type::LabelTyID)
BB = cast<BasicBlock>(N);
else
GenerateError("Reference to label '" + Name + "' is actually of type '"+
N->getType()->getDescription() + "'");
}
} else if (ID.Type == ValID::LocalID) {
if (ID.Num < CurFun.NextValNum && ID.Num < CurFun.Values.size()) {
if (CurFun.Values[ID.Num]->getType()->getTypeID() == Type::LabelTyID)