diff --git a/lld/COFF/DriverUtils.cpp b/lld/COFF/DriverUtils.cpp index 302cf04d2893..adb2a73cae25 100644 --- a/lld/COFF/DriverUtils.cpp +++ b/lld/COFF/DriverUtils.cpp @@ -572,16 +572,10 @@ public: memcpy(P, DLLName.data(), DLLName.size()); object::Archive::Child C(Parent, Buf); - return NewArchiveIterator(C, nextFilename()); + return NewArchiveIterator(C, DLLName); } private: - char *nextFilename() { - char *P = Alloc.Allocate(16); - sprintf(P, "%d.obj", Idx++); - return P; - } - BumpPtrAllocator Alloc; object::Archive *Parent; StringRef DLLName; diff --git a/lld/test/COFF/export.test b/lld/test/COFF/export.test index c91101989fc8..1c245054917e 100644 --- a/lld/test/COFF/export.test +++ b/lld/test/COFF/export.test @@ -74,9 +74,9 @@ CHECK6-NOT: duplicate /export option: exportfn1 # RUN: llvm-nm -M %t.lib | FileCheck --check-prefix=SYMTAB %s -SYMTAB: __imp_exportfn1 in 1.obj -SYMTAB: exportfn1 in 1.obj -SYMTAB: __imp_exportfn2 in 2.obj -SYMTAB: exportfn2 in 2.obj -SYMTAB: __imp_exportfn3 in 3.obj -SYMTAB: exportfn3 in 3.obj \ No newline at end of file +SYMTAB: __imp_exportfn1 in export.test.tmp.dll +SYMTAB: exportfn1 in export.test.tmp.dll +SYMTAB: __imp_exportfn2 in export.test.tmp.dll +SYMTAB: exportfn2 in export.test.tmp.dll +SYMTAB: __imp_exportfn3 in export.test.tmp.dll +SYMTAB: exportfn3 in export.test.tmp.dll