@@ -3921,12 +3921,15 @@ SwiftASTContext::GetModuleImportProgressRAII(std::string category) {
3921
3921
category);
3922
3922
}
3923
3923
3924
+ static constexpr llvm::StringLiteral g_invalid_context =
3925
+ " could not initialize Swift compiler, run swift-healthcheck for more info" ;
3926
+
3924
3927
llvm::Expected<swift::ModuleDecl &>
3925
3928
SwiftASTContext::GetModule (const SourceModule &module , bool *cached) {
3926
3929
if (cached)
3927
3930
*cached = false ;
3928
3931
3929
- VALID_OR_RETURN (llvm::createStringError (" invalid context " ));
3932
+ VALID_OR_RETURN (llvm::createStringError (g_invalid_context ));
3930
3933
std::string module_name = llvm::join (module .path , " ." );
3931
3934
3932
3935
LOG_PRINTF (GetLog (LLDBLog::Types), " (\" %s\" )" , module_name.c_str ());
@@ -6584,7 +6587,7 @@ bool SwiftASTContext::IsFixedSize(CompilerType compiler_type) {
6584
6587
llvm::Expected<uint64_t >
6585
6588
SwiftASTContext::GetBitSize (opaque_compiler_type_t type,
6586
6589
ExecutionContextScope *exe_scope) {
6587
- VALID_OR_RETURN_CHECK_TYPE (type, llvm::createStringError (" invalid context " ));
6590
+ VALID_OR_RETURN_CHECK_TYPE (type, llvm::createStringError (g_invalid_context ));
6588
6591
6589
6592
// If the type has type parameters, bind them first.
6590
6593
swift::CanType swift_can_type (GetCanonicalSwiftType (type));
@@ -6831,7 +6834,7 @@ llvm::Expected<uint32_t>
6831
6834
SwiftASTContext::GetNumChildren (opaque_compiler_type_t type,
6832
6835
bool omit_empty_base_classes,
6833
6836
const ExecutionContext *exe_ctx) {
6834
- VALID_OR_RETURN_CHECK_TYPE (type, llvm::createStringError (" invalid type " ));
6837
+ VALID_OR_RETURN_CHECK_TYPE (type, llvm::createStringError (g_invalid_context ));
6835
6838
6836
6839
swift::CanType swift_can_type (GetCanonicalSwiftType (type));
6837
6840
0 commit comments