Change sym_check to filter non-stdlib symbols.

Currently sym_check almost all names found in the binary, including those
which are defined in other libraries. This makes our ABI lists harder to maintain.

This patch adds a --only-stdlib-symbols option to sym_check which removes
all symbols which aren't possibly provided by libc++. It also re-generates
the linux ABI list after making this change.

llvm-svn: 287294
diff --git a/libcxx/utils/sym_check/sym_extract.py b/libcxx/utils/sym_check/sym_extract.py
index a0fbb3e..2776567 100755
--- a/libcxx/utils/sym_check/sym_extract.py
+++ b/libcxx/utils/sym_check/sym_extract.py
@@ -25,11 +25,16 @@
     parser.add_argument('--names-only', dest='names_only',
                         help='Output only the name of the symbol',
                         action='store_true', default=False)
+    parser.add_argument('--only-stdlib-symbols', dest='only_stdlib',
+                        help="Filter all symbols not related to the stdlib",
+                        action='store_true', default=False)
     args = parser.parse_args()
     if args.output is not None:
         print('Extracting symbols from %s to %s.'
               % (args.library, args.output))
     syms = extract.extract_symbols(args.library)
+    if args.only_stdlib:
+        syms, other_syms = util.filter_stdlib_symbols(syms)
     util.write_syms(syms, out=args.output, names_only=args.names_only)