From 1df9859c40492511b8aa4321eb76496005d3b75b Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Tue, 16 Feb 2010 11:11:14 +0000 Subject: There are two ways of checking for a given type, for example isa(T) and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96344 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/MSIL/MSILWriter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Target/MSIL/MSILWriter.cpp') diff --git a/lib/Target/MSIL/MSILWriter.cpp b/lib/Target/MSIL/MSILWriter.cpp index 3330d098a1..6f94800884 100644 --- a/lib/Target/MSIL/MSILWriter.cpp +++ b/lib/Target/MSIL/MSILWriter.cpp @@ -57,7 +57,7 @@ bool MSILModule::runOnModule(Module &M) { TypeSymbolTable& Table = M.getTypeSymbolTable(); std::set Types = getAnalysis().getTypes(); for (TypeSymbolTable::iterator I = Table.begin(), E = Table.end(); I!=E; ) { - if (!isa(I->second) && !isa(I->second)) + if (!I->second->isStructTy() && !isa(I->second)) Table.remove(I++); else { std::set::iterator T = Types.find(I->second); @@ -1459,7 +1459,7 @@ void MSILWriter::printDeclarations(const TypeSymbolTable& ST) { for (std::set::const_iterator UI = UsedTypes->begin(), UE = UsedTypes->end(); UI!=UE; ++UI) { const Type* Ty = *UI; - if (isa(Ty) || isa(Ty) || isa(Ty)) + if (Ty->isArrayTy() || Ty->isVectorTy() || Ty->isStructTy()) Name = getTypeName(Ty, false, true); // Type with no need to declare. else continue; -- cgit v1.2.3