From a1c2c4d7746495960f2a1f773db9ef91a2b87c02 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Fri, 26 Feb 2016 12:30:18 +0000 Subject: [PATCH] [PM] Finish removing references to fix MSVC builds. Somehow adding base classes changed whether the decltype of these expressions was a reference. I'm somewhat horrified why, and there may need to be a deeper fix on MSVC, but this should at least get the bots a step further. llvm-svn: 262008 --- lib/Passes/PassBuilder.cpp | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/lib/Passes/PassBuilder.cpp b/lib/Passes/PassBuilder.cpp index 692b09fd769..787688ab1ab 100644 --- a/lib/Passes/PassBuilder.cpp +++ b/lib/Passes/PassBuilder.cpp @@ -185,11 +185,13 @@ bool PassBuilder::parseModulePassName(ModulePassManager &MPM, StringRef Name) { } #define MODULE_ANALYSIS(NAME, CREATE_PASS) \ if (Name == "require<" NAME ">") { \ - MPM.addPass(RequireAnalysisPass()); \ + MPM.addPass(RequireAnalysisPass< \ + std::remove_reference::type>()); \ return true; \ } \ if (Name == "invalidate<" NAME ">") { \ - MPM.addPass(InvalidateAnalysisPass()); \ + MPM.addPass(InvalidateAnalysisPass< \ + std::remove_reference::type>()); \ return true; \ } #include "PassRegistry.def" @@ -205,11 +207,13 @@ bool PassBuilder::parseCGSCCPassName(CGSCCPassManager &CGPM, StringRef Name) { } #define CGSCC_ANALYSIS(NAME, CREATE_PASS) \ if (Name == "require<" NAME ">") { \ - CGPM.addPass(RequireAnalysisPass()); \ + CGPM.addPass(RequireAnalysisPass< \ + std::remove_reference::type>()); \ return true; \ } \ if (Name == "invalidate<" NAME ">") { \ - CGPM.addPass(InvalidateAnalysisPass()); \ + CGPM.addPass(InvalidateAnalysisPass< \ + std::remove_reference::type>()); \ return true; \ } #include "PassRegistry.def" @@ -226,11 +230,13 @@ bool PassBuilder::parseFunctionPassName(FunctionPassManager &FPM, } #define FUNCTION_ANALYSIS(NAME, CREATE_PASS) \ if (Name == "require<" NAME ">") { \ - FPM.addPass(RequireAnalysisPass()); \ + FPM.addPass(RequireAnalysisPass< \ + std::remove_reference::type>()); \ return true; \ } \ if (Name == "invalidate<" NAME ">") { \ - FPM.addPass(InvalidateAnalysisPass()); \ + FPM.addPass(InvalidateAnalysisPass< \ + std::remove_reference::type>()); \ return true; \ } #include "PassRegistry.def" @@ -247,11 +253,13 @@ bool PassBuilder::parseLoopPassName(LoopPassManager &FPM, } #define LOOP_ANALYSIS(NAME, CREATE_PASS) \ if (Name == "require<" NAME ">") { \ - FPM.addPass(RequireAnalysisPass()); \ + FPM.addPass(RequireAnalysisPass< \ + std::remove_reference::type>()); \ return true; \ } \ if (Name == "invalidate<" NAME ">") { \ - FPM.addPass(InvalidateAnalysisPass()); \ + FPM.addPass(InvalidateAnalysisPass< \ + std::remove_reference::type>()); \ return true; \ } #include "PassRegistry.def"