|
44 | 44 | #include "swift/AST/SubstitutionMap.h"
|
45 | 45 | #include "swift/AST/SILLayout.h"
|
46 | 46 | #include "swift/AST/TypeCheckRequests.h"
|
47 |
| -#include "swift/AST/TypeCheckerDebugConsumer.h" |
48 | 47 | #include "swift/Basic/Compiler.h"
|
49 | 48 | #include "swift/Basic/SourceManager.h"
|
50 | 49 | #include "swift/Basic/Statistic.h"
|
@@ -557,7 +556,6 @@ ASTContext::ASTContext(LangOptions &langOpts, TypeCheckerOptions &typeckOpts,
|
557 | 556 | TheBuiltinModule(createBuiltinModule(*this)),
|
558 | 557 | StdlibModuleName(getIdentifier(STDLIB_NAME)),
|
559 | 558 | SwiftShimsModuleName(getIdentifier(SWIFT_SHIMS_NAME)),
|
560 |
| - TypeCheckerDebug(new StderrTypeCheckerDebugConsumer()), |
561 | 559 | TheErrorType(
|
562 | 560 | new (*this, AllocationArena::Permanent)
|
563 | 561 | ErrorType(*this, Type(), RecursiveTypeProperties::HasError)),
|
@@ -3833,45 +3831,6 @@ void TypeLoc::setInvalidType(ASTContext &C) {
|
3833 | 3831 | Ty = ErrorType::get(C);
|
3834 | 3832 | }
|
3835 | 3833 |
|
3836 |
| -namespace { |
3837 |
| -class raw_capturing_ostream : public raw_ostream { |
3838 |
| - std::string Message; |
3839 |
| - uint64_t Pos; |
3840 |
| - CapturingTypeCheckerDebugConsumer &Listener; |
3841 |
| - |
3842 |
| -public: |
3843 |
| - raw_capturing_ostream(CapturingTypeCheckerDebugConsumer &Listener) |
3844 |
| - : Listener(Listener) {} |
3845 |
| - |
3846 |
| - ~raw_capturing_ostream() override { |
3847 |
| - flush(); |
3848 |
| - } |
3849 |
| - |
3850 |
| - void write_impl(const char *Ptr, size_t Size) override { |
3851 |
| - Message.append(Ptr, Size); |
3852 |
| - Pos += Size; |
3853 |
| - |
3854 |
| - // Check if we have at least one complete line. |
3855 |
| - size_t LastNewline = StringRef(Message).rfind('\n'); |
3856 |
| - if (LastNewline == StringRef::npos) |
3857 |
| - return; |
3858 |
| - Listener.handleMessage(StringRef(Message.data(), LastNewline + 1)); |
3859 |
| - Message.erase(0, LastNewline + 1); |
3860 |
| - } |
3861 |
| - |
3862 |
| - uint64_t current_pos() const override { |
3863 |
| - return Pos; |
3864 |
| - } |
3865 |
| -}; |
3866 |
| -} // unnamed namespace |
3867 |
| - |
3868 |
| -TypeCheckerDebugConsumer::~TypeCheckerDebugConsumer() { } |
3869 |
| - |
3870 |
| -CapturingTypeCheckerDebugConsumer::CapturingTypeCheckerDebugConsumer() |
3871 |
| - : Log(new raw_capturing_ostream(*this)) { |
3872 |
| - Log->SetUnbuffered(); |
3873 |
| -} |
3874 |
| - |
3875 | 3834 | void SubstitutionMap::Storage::Profile(
|
3876 | 3835 | llvm::FoldingSetNodeID &id,
|
3877 | 3836 | GenericSignature genericSig,
|
|
0 commit comments