diff --git a/lld/test/wasm/export-empty.test b/lld/test/wasm/export-empty.test new file mode 100644 --- /dev/null +++ b/lld/test/wasm/export-empty.test @@ -0,0 +1,4 @@ +RUN: llc -filetype=obj %p/Inputs/start.ll -o %t.o +RUN: not wasm-ld --export "" %t.o -o %t.wasm 2>&1 | FileCheck --match-full-lines %s + +CHECK: wasm-ld: error: symbol exported via --export not found: diff --git a/llvm/include/llvm/ADT/StringSet.h b/llvm/include/llvm/ADT/StringSet.h --- a/llvm/include/llvm/ADT/StringSet.h +++ b/llvm/include/llvm/ADT/StringSet.h @@ -36,7 +36,6 @@ explicit StringSet(AllocatorTy A) : base(A) {} std::pair insert(StringRef Key) { - assert(!Key.empty()); return base::insert(std::make_pair(Key, None)); }