size_t End = S.find(']', 1);
if (End == StringRef::npos) {
error("invalid glob pattern: " + Original);
+ S = "";
return BitVector(256, false);
}
StringRef Chars = S.substr(1, End - 1);
# RUN: ld.lld --version-script %t8.script -shared %t.o -o %t8.so
# RUN: llvm-readobj -V %t8.so | FileCheck %s --check-prefix=ABBABC
+# RUN: echo "FOO { global: extern \"C++\" { a[; }; };" > %t9.script
+# RUN: not ld.lld --version-script %t9.script -shared %t.o -o %t9.so 2>&1 \
+# RUN: | FileCheck %s --check-prefix=ERROR
+# ERROR: invalid glob pattern: a[
+
.text
.globl _Z3abci
.type _Z3abci,@function