diff --git a/llvm/test/TableGen/GlobalISelEmitter.td b/llvm/test/TableGen/GlobalISelEmitter.td index 82ecc4495e80ac..961200d9b63542 100644 --- a/llvm/test/TableGen/GlobalISelEmitter.td +++ b/llvm/test/TableGen/GlobalISelEmitter.td @@ -110,7 +110,7 @@ def HasC : Predicate<"Subtarget->hasC()"> { let RecomputePerFunction = 1; } // CHECK-LABEL: PredicateBitset MyTargetInstructionSelector:: // CHECK-NEXT: computeAvailableModuleFeatures(const MyTargetSubtarget *Subtarget) const { -// CHECK-NEXT: PredicateBitset Features; +// CHECK-NEXT: PredicateBitset Features{}; // CHECK-NEXT: if (Subtarget->hasA()) // CHECK-NEXT: Features.set(Feature_HasABit); // CHECK-NEXT: if (Subtarget->hasB()) @@ -120,7 +120,7 @@ def HasC : Predicate<"Subtarget->hasC()"> { let RecomputePerFunction = 1; } // CHECK-LABEL: PredicateBitset MyTargetInstructionSelector:: // CHECK-NEXT: computeAvailableFunctionFeatures(const MyTargetSubtarget *Subtarget, const MachineFunction *MF) const { -// CHECK-NEXT: PredicateBitset Features; +// CHECK-NEXT: PredicateBitset Features{}; // CHECK-NEXT: if (Subtarget->hasC()) // CHECK-NEXT: Features.set(Feature_HasCBit); // CHECK-NEXT: return Features; diff --git a/llvm/test/TableGen/GlobalISelEmitterHwModes.td b/llvm/test/TableGen/GlobalISelEmitterHwModes.td index 0c826fb50beb5f..b96e9db0134bfe 100644 --- a/llvm/test/TableGen/GlobalISelEmitterHwModes.td +++ b/llvm/test/TableGen/GlobalISelEmitterHwModes.td @@ -85,7 +85,7 @@ class I Pat> // CHECK-LABEL: PredicateBitset MyTargetInstructionSelector:: // CHECK-NEXT: computeAvailableModuleFeatures(const MyTargetSubtarget *Subtarget) const { -// CHECK-NEXT: PredicateBitset Features; +// CHECK-NEXT: PredicateBitset Features{}; // CHECK-NEXT: if (!((Subtarget->has64()))) // CHECK-NEXT: Features.set(Feature_HwMode1Bit); // CHECK-NEXT: if ((Subtarget->has64())) @@ -95,7 +95,7 @@ class I Pat> // CHECK-LABEL: PredicateBitset MyTargetInstructionSelector:: // CHECK-NEXT: computeAvailableFunctionFeatures(const MyTargetSubtarget *Subtarget, const MachineFunction *MF) const { -// CHECK-NEXT: PredicateBitset Features; +// CHECK-NEXT: PredicateBitset Features{}; // CHECK-NEXT: return Features; // CHECK-NEXT: } diff --git a/llvm/utils/TableGen/Common/SubtargetFeatureInfo.cpp b/llvm/utils/TableGen/Common/SubtargetFeatureInfo.cpp index 819abfa965a58c..4f57234d6fe275 100644 --- a/llvm/utils/TableGen/Common/SubtargetFeatureInfo.cpp +++ b/llvm/utils/TableGen/Common/SubtargetFeatureInfo.cpp @@ -108,7 +108,7 @@ void SubtargetFeatureInfo::emitComputeAvailableFeatures( if (!ExtraParams.empty()) OS << ", " << ExtraParams; OS << ") const {\n"; - OS << " PredicateBitset Features;\n"; + OS << " PredicateBitset Features{};\n"; for (const auto &SF : SubtargetFeatures) { const SubtargetFeatureInfo &SFI = SF.second; StringRef CondStr = SFI.TheDef->getValueAsString("CondString");