[llvm] 4f1897c - Move PassBuilder::registerParseTopLevelPipelineCallback out-of-line
Hans Wennborg via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 25 10:56:02 PDT 2020
Author: Hans Wennborg
Date: 2020-09-25T19:55:40+02:00
New Revision: 4f1897c6f0082ef968547458b1b7b2fba0bf1590
URL: https://github.com/llvm/llvm-project/commit/4f1897c6f0082ef968547458b1b7b2fba0bf1590
DIFF: https://github.com/llvm/llvm-project/commit/4f1897c6f0082ef968547458b1b7b2fba0bf1590.diff
LOG: 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).
Added:
Modified:
llvm/include/llvm/Passes/PassBuilder.h
llvm/lib/Passes/PassBuilder.cpp
Removed:
################################################################################
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 @@ class PassBuilder {
/// 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);
+}
More information about the llvm-commits
mailing list