Skip to content

Commit 9343a47

Browse files
committed
Initialize with null
1 parent 775f978 commit 9343a47

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/include/llvm/CodeGen/MachinePassManager.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,20 +250,20 @@ PreservedAnalyses getMachineFunctionPassPreservedAnalyses();
250250
/// `getAnalysis` or `getCachedAnalysis`.
251251
class MFAnalysisGetter {
252252
private:
253-
Pass *LegacyPass;
254-
MachineFunctionAnalysisManager *MFAM;
253+
Pass *LegacyPass = nullptr;
254+
MachineFunctionAnalysisManager *MFAM = nullptr;
255255

256256
template <typename T>
257257
using type_of_run =
258258
typename function_traits<decltype(&T::run)>::template arg_t<0>;
259259

260260
template <typename T>
261261
static constexpr bool IsFunctionAnalysis =
262-
std::is_same_v<Function, type_of_run<T>>;
262+
std::is_same_v<Function &, type_of_run<T>>;
263263

264264
template <typename T>
265265
static constexpr bool IsModuleAnalysis =
266-
std::is_same_v<Module, type_of_run<T>>;
266+
std::is_same_v<Module &, type_of_run<T>>;
267267

268268
public:
269269
MFAnalysisGetter(Pass *LegacyPass) : LegacyPass(LegacyPass) {}

0 commit comments

Comments
 (0)