@@ -141,7 +141,7 @@ static OrderMap orderModule(const Module *M) {
141141 OrderMap OM;
142142
143143 auto orderConstantValue = [&OM](const Value *V) {
144- if (isa<Constant>(V) || isa< InlineAsm>(V))
144+ if (isa<Constant, InlineAsm>(V))
145145 orderValue (V, OM);
146146 };
147147
@@ -1625,7 +1625,7 @@ static void WriteConstantInternal(raw_ostream &Out, const Constant *CV,
16251625 return ;
16261626 }
16271627
1628- if (isa<ConstantAggregateZero>(CV) || isa< ConstantTargetNone>(CV)) {
1628+ if (isa<ConstantAggregateZero, ConstantTargetNone>(CV)) {
16291629 Out << " zeroinitializer" ;
16301630 return ;
16311631 }
@@ -1741,7 +1741,7 @@ static void WriteConstantInternal(raw_ostream &Out, const Constant *CV,
17411741 return ;
17421742 }
17431743
1744- if (isa<ConstantVector>(CV) || isa< ConstantDataVector>(CV)) {
1744+ if (isa<ConstantVector, ConstantDataVector>(CV)) {
17451745 auto *CVVTy = cast<FixedVectorType>(CV->getType ());
17461746 Type *ETy = CVVTy->getElementType ();
17471747
@@ -1751,7 +1751,7 @@ static void WriteConstantInternal(raw_ostream &Out, const Constant *CV,
17511751 // TODO: Remove this block when the UseConstant{Int,FP}ForFixedLengthSplat
17521752 // options are removed.
17531753 if (auto *SplatVal = CV->getSplatValue ()) {
1754- if (isa<ConstantInt>(SplatVal) || isa< ConstantFP>(SplatVal)) {
1754+ if (isa<ConstantInt, ConstantFP>(SplatVal)) {
17551755 Out << " splat (" ;
17561756 WriterCtx.TypePrinter ->print (ETy, Out);
17571757 Out << ' ' ;
@@ -1803,7 +1803,7 @@ static void WriteConstantInternal(raw_ostream &Out, const Constant *CV,
18031803 // options are removed.
18041804 if (CE->getOpcode () == Instruction::ShuffleVector) {
18051805 if (auto *SplatVal = CE->getSplatValue ()) {
1806- if (isa<ConstantInt>(SplatVal) || isa< ConstantFP>(SplatVal)) {
1806+ if (isa<ConstantInt, ConstantFP>(SplatVal)) {
18071807 Out << " splat (" ;
18081808 WriterCtx.TypePrinter ->print (SplatVal->getType (), Out);
18091809 Out << ' ' ;
@@ -4760,9 +4760,8 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
47604760
47614761 // Select, Store, ShuffleVector, CmpXchg and AtomicRMW always print all
47624762 // types.
4763- if (isa<SelectInst>(I) || isa<StoreInst>(I) || isa<ShuffleVectorInst>(I) ||
4764- isa<ReturnInst>(I) || isa<AtomicCmpXchgInst>(I) ||
4765- isa<AtomicRMWInst>(I)) {
4763+ if (isa<SelectInst, StoreInst, ShuffleVectorInst, ReturnInst,
4764+ AtomicCmpXchgInst, AtomicRMWInst>(I)) {
47664765 PrintAllTypes = true ;
47674766 } else {
47684767 for (unsigned i = 1 , E = I.getNumOperands (); i != E; ++i) {
@@ -5194,7 +5193,7 @@ void Value::print(raw_ostream &ROS, bool IsForDebug) const {
51945193 bool ShouldInitializeAllMetadata = false ;
51955194 if (auto *I = dyn_cast<Instruction>(this ))
51965195 ShouldInitializeAllMetadata = isReferencingMDNode (*I);
5197- else if (isa<Function>( this ) || isa< MetadataAsValue>(this ))
5196+ else if (isa<Function, MetadataAsValue>(this ))
51985197 ShouldInitializeAllMetadata = true ;
51995198
52005199 ModuleSlotTracker MST (getModuleFromVal (this ), ShouldInitializeAllMetadata);
@@ -5240,7 +5239,7 @@ void Value::print(raw_ostream &ROS, ModuleSlotTracker &MST,
52405239 OS << ' ' ;
52415240 AsmWriterContext WriterCtx (&TypePrinter, MST.getMachine ());
52425241 WriteConstantInternal (OS, C, WriterCtx);
5243- } else if (isa<InlineAsm>( this ) || isa< Argument>(this )) {
5242+ } else if (isa<InlineAsm, Argument>(this )) {
52445243 this ->printAsOperand (OS, /* PrintType */ true , MST);
52455244 } else {
52465245 llvm_unreachable (" Unknown value to print out!" );
0 commit comments