Object: account for short output names (#66532)
The import library thunk name suffix uses the stem of the file. We
currently would attempt to trim the suffix by dropping the trailing 4
characters (under the assumption that the output name was `.lib`). This
now uses the `llvm::sys::path` API for computing the stem. This avoids
an assertion failure when the name is less the 4 characters and
assertions are enabled.
GitOrigin-RevId: 401296f697b4ec2088afa0637d698999b2fe7228
diff --git a/test/COFF/implib-name.test b/test/COFF/implib-name.test
index 4a875ab..3ec8d82 100644
--- a/test/COFF/implib-name.test
+++ b/test/COFF/implib-name.test
@@ -70,3 +70,4 @@
CHECK-NODEF-DLL: default.dll
CHECK-NODEF-DLL: default.dll
+# RUN: lld-link /nologo /machine:x64 /out:%T/exe %T/object.obj /entry:f /subsystem:CONSOLE