File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -475,14 +475,19 @@ struct ASTContext::Implementation {
475
475
// / The IRGen specific SIL transforms that have been registered.
476
476
SILTransformCtors IRGenSILPasses;
477
477
478
+ #if !SWIFT_BUILD_ONLY_SYNTAXPARSERLIB
478
479
// / The scratch context used to allocate intrinsic data on behalf of \c swift::IntrinsicInfo
479
480
std::unique_ptr<llvm::LLVMContext> IntrinsicScratchContext;
481
+ #endif
480
482
};
481
483
482
484
ASTContext::Implementation::Implementation ()
483
485
: IdentifierTable(Allocator),
484
- TheSyntaxArena(new syntax::SyntaxArena()),
485
- IntrinsicScratchContext(new llvm::LLVMContext()) {}
486
+ TheSyntaxArena(new syntax::SyntaxArena())
487
+ #if !SWIFT_BUILD_ONLY_SYNTAXPARSERLIB
488
+ , IntrinsicScratchContext(new llvm::LLVMContext())
489
+ #endif
490
+ {}
486
491
ASTContext::Implementation::~Implementation () {
487
492
for (auto &cleanup : Cleanups)
488
493
cleanup ();
@@ -4799,6 +4804,8 @@ AutoDiffDerivativeFunctionIdentifier *AutoDiffDerivativeFunctionIdentifier::get(
4799
4804
}
4800
4805
4801
4806
llvm::LLVMContext &ASTContext::getIntrinsicScratchContext () const {
4807
+ #if !SWIFT_BUILD_ONLY_SYNTAXPARSERLIB
4802
4808
return *getImpl ().IntrinsicScratchContext .get ();
4809
+ #endif
4803
4810
}
4804
4811
You can’t perform that action at this time.
0 commit comments