@@ -3973,12 +3973,15 @@ SwiftASTContext::GetModuleImportProgressRAII(std::string category) {
39733973 category);
39743974}
39753975
3976+ static constexpr llvm::StringLiteral g_invalid_context =
3977+ " could not initialize Swift compiler, run swift-healthcheck for more info" ;
3978+
39763979llvm::Expected<swift::ModuleDecl &>
39773980SwiftASTContext::GetModule (const SourceModule &module , bool *cached) {
39783981 if (cached)
39793982 *cached = false ;
39803983
3981- VALID_OR_RETURN (llvm::createStringError (" invalid context " ));
3984+ VALID_OR_RETURN (llvm::createStringError (g_invalid_context ));
39823985 std::string module_name = llvm::join (module .path , " ." );
39833986
39843987 LOG_PRINTF (GetLog (LLDBLog::Types), " (\" %s\" )" , module_name.c_str ());
@@ -6639,7 +6642,7 @@ bool SwiftASTContext::IsFixedSize(CompilerType compiler_type) {
66396642llvm::Expected<uint64_t >
66406643SwiftASTContext::GetBitSize (opaque_compiler_type_t type,
66416644 ExecutionContextScope *exe_scope) {
6642- VALID_OR_RETURN_CHECK_TYPE (type, llvm::createStringError (" invalid context " ));
6645+ VALID_OR_RETURN_CHECK_TYPE (type, llvm::createStringError (g_invalid_context ));
66436646
66446647 // If the type has type parameters, bind them first.
66456648 swift::CanType swift_can_type (GetCanonicalSwiftType (type));
@@ -6886,7 +6889,7 @@ llvm::Expected<uint32_t>
68866889SwiftASTContext::GetNumChildren (opaque_compiler_type_t type,
68876890 bool omit_empty_base_classes,
68886891 const ExecutionContext *exe_ctx) {
6889- VALID_OR_RETURN_CHECK_TYPE (type, llvm::createStringError (" invalid type " ));
6892+ VALID_OR_RETURN_CHECK_TYPE (type, llvm::createStringError (g_invalid_context ));
68906893
68916894 swift::CanType swift_can_type (GetCanonicalSwiftType (type));
68926895
0 commit comments