summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Wennborg <hans@chromium.org>2020-09-25 19:49:15 +0200
committerHans Wennborg <hans@chromium.org>2020-09-25 19:55:40 +0200
commit4f1897c6f0082ef968547458b1b7b2fba0bf1590 (patch)
tree62d3c463afa4de86488c2317831fb9424d6f7b0e
parent8055ae31f46b0a3fafd7b64f6cd77b78b34e6753 (diff)
Move PassBuilder::registerParseTopLevelPipelineCallback out-of-line
For some mysterious reason it doesn't build with clang-cl when compiled as part of the includes in clang's CodeGenAction.cpp (crbug.com/1132292).
-rw-r--r--llvm/include/llvm/Passes/PassBuilder.h4
-rw-r--r--llvm/lib/Passes/PassBuilder.cpp6
2 files changed, 7 insertions, 3 deletions
diff --git a/llvm/include/llvm/Passes/PassBuilder.h b/llvm/include/llvm/Passes/PassBuilder.h
index b0703457656b..73ee6092d747 100644
--- a/llvm/include/llvm/Passes/PassBuilder.h
+++ b/llvm/include/llvm/Passes/PassBuilder.h
@@ -682,9 +682,7 @@ public:
/// PassManagers and populate the passed ModulePassManager.
void registerParseTopLevelPipelineCallback(
const std::function<bool(ModulePassManager &, ArrayRef<PipelineElement>,
- bool VerifyEachPass, bool DebugLogging)> &C) {
- TopLevelPipelineParsingCallbacks.push_back(C);
- }
+ bool VerifyEachPass, bool DebugLogging)> &C);
/// Add PGOInstrumenation passes for O0 only.
void addPGOInstrPassesForO0(ModulePassManager &MPM, bool DebugLogging,
diff --git a/llvm/lib/Passes/PassBuilder.cpp b/llvm/lib/Passes/PassBuilder.cpp
index a19d2935994a..2a05654fa865 100644
--- a/llvm/lib/Passes/PassBuilder.cpp
+++ b/llvm/lib/Passes/PassBuilder.cpp
@@ -2835,3 +2835,9 @@ bool PassBuilder::isAnalysisPassName(StringRef PassName) {
#include "PassRegistry.def"
return false;
}
+
+void PassBuilder::registerParseTopLevelPipelineCallback(
+ const std::function<bool(ModulePassManager &, ArrayRef<PipelineElement>,
+ bool VerifyEachPass, bool DebugLogging)> &C) {
+ TopLevelPipelineParsingCallbacks.push_back(C);
+}