Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / libc / test / UnitTest / LibcTestMain.cpp
blobbf1a921c04ca98c20fe553f013ade90594f0db16
1 //===-- Main function for implementation of base class for libc unittests -===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #include "LibcTest.h"
11 static const char *getTestFilter(int argc, char *argv[]) {
12 return argc > 1 ? argv[1] : nullptr;
15 extern "C" int main(int argc, char **argv, char **envp) {
16 LIBC_NAMESPACE::testing::argc = argc;
17 LIBC_NAMESPACE::testing::argv = argv;
18 LIBC_NAMESPACE::testing::envp = envp;
20 const char *TestFilter = getTestFilter(argc, argv);
21 return LIBC_NAMESPACE::testing::Test::runTests(TestFilter);