File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -152,18 +152,17 @@ static bool isCompatible(InputFile *file) {
152152 return false ;
153153 }
154154
155- InputFile *existing;
155+ InputFile *existing = nullptr ;
156156 if (!objectFiles.empty ())
157157 existing = objectFiles[0 ];
158158 else if (!sharedFiles.empty ())
159159 existing = sharedFiles[0 ];
160160 else if (!bitcodeFiles.empty ())
161161 existing = bitcodeFiles[0 ];
162- else
163- llvm_unreachable (" Must have -m, OUTPUT_FORMAT or existing input file to "
164- " determine target emulation" );
165-
166- error (toString (file) + " is incompatible with " + toString (existing));
162+ std::string with;
163+ if (existing)
164+ with = " with " + toString (existing);
165+ error (toString (file) + " is incompatible" + with);
167166 return false ;
168167}
169168
Original file line number Diff line number Diff line change 1010// * -m was not used.
1111// CHECK: .a({{.*}}a.o) is incompatible with {{.*}}b.o
1212
13+ // RUN: not ld.lld --start-lib %ta.o --end-lib %tb.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=CHECK2
14+
15+ // CHECK2: {{.*}}b.o is incompatible{{$}}
You can’t perform that action at this time.
0 commit comments