[AMDGPUCtorDtorLowering] Fix returned PreservedAnalyses
authorArthur Eubanks <aeubanks@google.com>
Thu, 16 Mar 2023 16:35:52 +0000 (09:35 -0700)
committerArthur Eubanks <aeubanks@google.com>
Thu, 16 Mar 2023 16:36:17 +0000 (09:36 -0700)
llvm/lib/Target/AMDGPU/AMDGPUCtorDtorLowering.cpp

index ba5a879..39736ae 100644 (file)
@@ -92,8 +92,8 @@ public:
 
 PreservedAnalyses AMDGPUCtorDtorLoweringPass::run(Module &M,
                                                   ModuleAnalysisManager &AM) {
-  lowerCtorsAndDtors(M);
-  return PreservedAnalyses::all();
+  return lowerCtorsAndDtors(M) ? PreservedAnalyses::none()
+                               : PreservedAnalyses::all();
 }
 
 char AMDGPUCtorDtorLoweringLegacy::ID = 0;