forked from OSchip/llvm-project
[PS5] Avoid a driver crash
In some cases, an error constructing a compiler or assembler job could leave the Inputs in a state that the code for constructing the linker job was not ready for.
This commit is contained in:
parent
8c64928887
commit
20c873c12f
|
@ -255,6 +255,10 @@ void tools::AddLinkerInputs(const ToolChain &TC, const InputInfoList &Inputs,
|
|||
continue;
|
||||
}
|
||||
|
||||
// In some error cases, the input could be Nothing; skip those.
|
||||
if (II.isNothing())
|
||||
continue;
|
||||
|
||||
// Otherwise, this is a linker input argument.
|
||||
const Arg &A = II.getInputArg();
|
||||
|
||||
|
|
|
@ -13,8 +13,9 @@
|
|||
|
||||
// DEFAULT-NOT: -no-integrated-as
|
||||
|
||||
// RUN: %clang -target x86_64-sie-ps5 -### -no-integrated-as %s -c 2>&1 \
|
||||
/// -c omitted on purpose, this used to crash.
|
||||
// RUN: %clang -target x86_64-sie-ps5 -### -no-integrated-as %s 2>&1 \
|
||||
// RUN: | FileCheck %s -check-prefix PS5
|
||||
// RUN: %clang -target x86_64-sie-ps5 -### -no-integrated-as %s -c -x assembler 2>&1 \
|
||||
// RUN: %clang -target x86_64-sie-ps5 -### -no-integrated-as %s -x assembler 2>&1 \
|
||||
// RUN: | FileCheck %s -check-prefix PS5
|
||||
// PS5: there is no external assembler that can be used on this platform
|
||||
|
|
Loading…
Reference in New Issue