Skip to content

Commit 4f1897c

Browse files
committed
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).
1 parent 8055ae3 commit 4f1897c

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

llvm/include/llvm/Passes/PassBuilder.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -682,9 +682,7 @@ class PassBuilder {
682682
/// PassManagers and populate the passed ModulePassManager.
683683
void registerParseTopLevelPipelineCallback(
684684
const std::function<bool(ModulePassManager &, ArrayRef<PipelineElement>,
685-
bool VerifyEachPass, bool DebugLogging)> &C) {
686-
TopLevelPipelineParsingCallbacks.push_back(C);
687-
}
685+
bool VerifyEachPass, bool DebugLogging)> &C);
688686

689687
/// Add PGOInstrumenation passes for O0 only.
690688
void addPGOInstrPassesForO0(ModulePassManager &MPM, bool DebugLogging,

llvm/lib/Passes/PassBuilder.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2835,3 +2835,9 @@ bool PassBuilder::isAnalysisPassName(StringRef PassName) {
28352835
#include "PassRegistry.def"
28362836
return false;
28372837
}
2838+
2839+
void PassBuilder::registerParseTopLevelPipelineCallback(
2840+
const std::function<bool(ModulePassManager &, ArrayRef<PipelineElement>,
2841+
bool VerifyEachPass, bool DebugLogging)> &C) {
2842+
TopLevelPipelineParsingCallbacks.push_back(C);
2843+
}

0 commit comments

Comments
 (0)